Example #1
0
 public override void UseStation(bool engage, PigBehaviour player)
 {
     base.UseStation(engage, player);
     if (engage) {
         waterClock.setPumpingWater(true);
     } else {
         waterClock.setPumpingWater(false);
     }
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        boredom     = boredomMax;
        gameRunning = true;

        pig = (PigBehaviour)FindObjectOfType(typeof(PigBehaviour));

        tickIndex = 0;
        fade      = this.GetComponent <FadeBehaviour>();
        fade.FadeIn();
    }
    public override void UseStation(bool engage, PigBehaviour player)
    {
        base.UseStation(engage, player);

        if (engage) {
            subCamera.zoomCamera(true);
            particles.Play();
        } else {
            subCamera.zoomCamera(false);
            particles.Stop();
        }
    }
Example #4
0
    public virtual void UseStation(bool engage, PigBehaviour player)
    {
        if (engage) {
            engaged = true;
            player.useStation(this);
        } else {
            engaged = false;
            player.useStation(null);
        }

        audio.PlayOneShot(activateStationSound);
    }
Example #5
0
    void OnTriggerEnter(Collider other)
    {
        PigBehaviour pig = other.GetComponent <PigBehaviour>();

        if (null != pig)
        {
            //if(!pig.rigidbody.isKinematic){

            pig.AbandonRocket();
            pig.rigidbody.velocity = pig.rigidbody.velocity / 5f;
            pig.rigidbody.drag     = 0.999f;
            //	}
            pig.Die();
        }
    }
Example #6
0
    public void OnTriggerEnter(Collider other)
    {
        PigBehaviour  pig    = other.GetComponent <PigBehaviour>();
        TargetTrigger target = other.GetComponent <TargetTrigger>();

        if (pig != null)
        {
            pig.Stun();
        }

        if (target != null)
        {
            target.Explode();
        }

        if (other.rigidbody != null)
        {
            Vector3 direction = (other.transform.position - transform.position);
            direction.z = 0f;
            direction   = direction.normalized;

            other.rigidbody.AddForce(direction * explosionForce, ForceMode.VelocityChange);
        }
    }
Example #7
0
    // Use this for initialization
    void Start()
    {
        boredom = boredomMax;
        gameRunning = true;

        pig = (PigBehaviour) FindObjectOfType(typeof(PigBehaviour));

        tickIndex = 0;
        fade = this.GetComponent<FadeBehaviour>();
        fade.FadeIn();
    }
Example #8
0
 public override void UseStation(bool engage, PigBehaviour player)
 {
     base.UseStation(engage, player);
     reloadTimer = 0f;
 }
Example #9
0
 // Use this for initialization
 void Start()
 {
     waterLevel = 0f;
     leakMultiplyer = 0f;
     gameRunning = true;
     pumpingWater = false;
     pig = (PigBehaviour) FindObjectOfType(typeof(PigBehaviour));
     sub = (RocketStationBehaviour) FindObjectOfType(typeof(RocketStationBehaviour));
     pumpBroke=false;
     tickIndex = 0;
     hullText.text = "hull: 100";
 }