private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { cc.gravity = 5f; cc.inWater = false; cc.doubleJump = false; cc.speed = 2f; cc.jumpHeight = 1f; cc.resetGravity(); } if (other.tag == "Bear") { bcc.gravity = 5f; bcc.inWater = false; bcc.doubleJump = false; bcc.speed = 2f; bcc.jumpHeight = 1f; bcc.resetGravity(); } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { cc.gravity = 5f; cc.inWater = true; cc.doubleJump = true; cc.speed = 5; cc.jumpHeight = 3; cc.resetGravity(); AnimatorScript.InWater = true; FindObjectOfType <AudioManager>().Play("Splash"); } if (other.tag == "Bear") { bcc.gravity = 5f; bcc.inWater = true; bcc.doubleJump = true; bcc.speed = 5; bcc.jumpHeight = 3; bcc.resetGravity(); FindObjectOfType <AudioManager>().Play("Splash"); } }