public static void InvokePlayerHandcuffFree(GameObject player, GameObject target, ref bool allow)
        {
            if (PlayerHandcuffFreedEvent == null)
            {
                return;
            }

            HandcuffEvent ev = new HandcuffEvent()
            {
                Player = player.GetPlayer(),
                Target = target.GetPlayer(),
                Allow  = allow
            };

            PlayerHandcuffFreedEvent.InvokeSafely(ev);

            allow = ev.Allow;
        }
Exemple #2
0
        public static void InvokePlayerHandcuffFree(GameObject player, GameObject target, ref bool allow)
        {
            HandcuffFreed handcuffFreed = PlayerHandcuffFreedEvent;

            if (handcuffFreed == null)
            {
                return;
            }
            HandcuffEvent ev = new HandcuffEvent()
            {
                Player = Player.GetPlayer(player),
                Target = Player.GetPlayer(target),
                Allow  = allow
            };

            handcuffFreed.Invoke(ref ev);
            allow = ev.Allow;
        }