Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }