void OnTriggerEnter2D(Collider2D collider) { NPlayerController player = collider.gameObject.GetComponent <NPlayerController>(); if (player != null) { player.DeathByFalling(); } }