public override void UseStation(bool engage, PigBehaviour player) { base.UseStation(engage, player); if (engage) { waterClock.setPumpingWater(true); } else { waterClock.setPumpingWater(false); } }
// 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(); } }
public virtual void UseStation(bool engage, PigBehaviour player) { if (engage) { engaged = true; player.useStation(this); } else { engaged = false; player.useStation(null); } audio.PlayOneShot(activateStationSound); }
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(); } }
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); } }
// 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); reloadTimer = 0f; }
// 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"; }