private void OnTriggerEnter(Collider other) { if (other.tag == "DummyTrain") { deathHandler.m_DeathFader.SetFadeColor(Color.black); deathHandler.FadeTime = 1; deathHandler.KillPlayer("death_timeup"); } }
private void OnTriggerEnter(Collider other) { if (other.name == "PlayerHeadCollision" && sawblade.IsSpinning()) { playerdeathHandler.KillPlayer("death_sawblade"); } else if (other.name == "Bomb" && sawblade.IsSpinning()) { FindObjectOfType <Bomb>().TimerTimeOut(); } }
private void OnTriggerEnter(Collider other) { // This block handled in TrainEscapeHandler, for now. /* * if (this.gameObject.name == "CameraFollower") * if (other.gameObject.name == "tunnel_bot") * { * if(FindObjectOfType<StationMover>().currentSpeed > 1.5) * { * playerDeathHandler.KillPlayer("death_trainjump"); * } * } */ if (this.gameObject.name == "CameraFollower") { return; } if (other.tag == "Banana") { Debug.Log("Banana bite!"); other.GetComponent <Banana>().BiteBanana(); } if (this.gameObject.name == "CameraFollower") { return; } if (other.gameObject.name == "Shell") { if (FindObjectOfType <TrainVelocity>().GetVelocity > 2 && !FindObjectOfType <TrainArriver>().HasArrived) { playerDeathHandler.KillPlayer("death_trainhit", true); } } }