コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: PlayerEvents.cs プロジェクト: Killers0992/EXILED
        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;
        }