private void FinalizeCatching(FinishCatchEvent e) { if (e.guess == null) { return; } GhostController ghostController = e.guess.GetComponent <GhostController>(); if (ghostController != null && ghostController.enabled) { if (e.hunter == e.guess) { Events.g.Raise(new EndGameEvent(winner: Player.NoPlayer, rationale: EndReason.HunterCaughtGhostInSameBody)); } else { Events.g.Raise(new EndGameEvent(winner: Player.HunterPlayer, rationale: EndReason.HunterCaughtGhost)); } } else { Events.g.Raise(new EndGameEvent(winner: Player.GhostPlayer, rationale: EndReason.HunterCaughtInnocent)); } }
private void MarkCatchFinalized(FinishCatchEvent e) { _catchFinalized = true; }