// If the player runs into a ghost, send one of them to the ActorCommands script for destruction, unless the player is immune due to recent death. // ReSharper disable once UnusedMember.Local private void OnTriggerEnter(Component other) { if (!(this.killTimer >= 1)) { if (other.tag == "Ghost" && this.isPlayer) { if (this.ghostKiller) { ActorCommands.GhostKill(other.gameObject); } else { ActorCommands.PlayerKill(this.gameObject); } } } }