private void OnCollisionEnter(Collision collision) { if (!collision.gameObject.GetComponent <Player>()) { return; } TiggerManager.ResetTriggers(); Player.Instance.OnDeath(); }
private void Update() { if (!_victory) { return; } if (Input.GetKey(KeyCode.Escape)) { Application.Quit(); } if (Input.GetKey(KeyCode.Space)) { Player.Instance.OnDeath(); TiggerManager.ResetTriggers(); victoryText.enabled = false; instructionText.enabled = false; } }
private void OnTriggerEnter(Collider other) { Player.Instance.OnDeath(); TiggerManager.ResetTriggers(); }