private void OnTriggerEnter(Collider other) { if (other.gameObject.layer == instantDeath) { if (gameplay) { gameplayLogic.GameOver(); } Death(); } }