private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Player") && !dead) { CheckpointChecker.respawnPlayer(collision.gameObject); transform.position = startPos; onCollisionExtra(); } otherCollisionExtra(collision); }
/// <summary> /// Resets the player's position after he fails /// </summary> public void respawn() { CheckpointChecker.respawnPlayer(gameObject); }