public static void InvokeCheckEscape(GameObject player, ref bool allow) { if (CheckEscapeEvent == null) { return; } CheckEscapeEvent ev = new CheckEscapeEvent { Player = player.GetPlayer(), Allow = allow }; CheckEscapeEvent.InvokeSafely(ev); allow = ev.Allow; }
public static void InvokeCheckEscape(GameObject ply, ref bool allow) { CheckEscape checkEscape = CheckEscapeEvent; if (checkEscape == null) { return; } CheckEscapeEvent ev = new CheckEscapeEvent { Player = Player.GetPlayer(ply), Allow = allow }; checkEscape.Invoke(ref ev); allow = ev.Allow; }