示例#1
0
        public static void InvokePlayerReload(GameObject player, ref bool allow)
        {
            if (PlayerReloadEvent == null)
            {
                return;
            }

            PlayerReloadEvent ev = new PlayerReloadEvent
            {
                Player = player.GetPlayer(),
                Allow  = allow
            };

            PlayerReloadEvent.Invoke(ref ev);

            allow = ev.Allow;
        }
示例#2
0
        public static void InvokePlayerReload(GameObject player, ref bool allow, bool animationOnly)
        {
            if (PlayerReloadEvent == null)
            {
                return;
            }

            PlayerReloadEvent ev = new PlayerReloadEvent
            {
                Player        = player.GetPlayer(),
                Allow         = allow,
                AnimationOnly = animationOnly
            };

            PlayerReloadEvent.InvokeSafely(ev);

            allow = ev.Allow;
        }
示例#3
0
        public static void InvokePlayerReload(GameObject player, ref bool allow)
        {
            PlayerReload playerReload = PlayerReloadEvent;

            if (playerReload == null)
            {
                return;
            }

            PlayerReloadEvent ev = new PlayerReloadEvent
            {
                Player = Player.GetPlayer(player),
                Allow  = allow
            };

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