Exemplo n.º 1
0
        internal void InvokeThrowGrenade(Player player, SynapseItem grenade, out bool allow)
        {
            var ev = new PlayerThrowGrenadeEventArgs
            {
                Allow  = true,
                Item   = grenade,
                Player = player
            };

            PlayerThrowGrenadeEvent?.Invoke(ev);

            allow = ev.Allow;
        }
Exemplo n.º 2
0
        internal void InvokePlayerThrowGrenadeEvent(Player player, SynapseItem item, ref GrenadeSettings settings, ref float force, ref float delay, ref bool allow)
        {
            var ev = new PlayerThrowGrenadeEventArgs
            {
                Player          = player,
                Item            = item,
                ForceMultiplier = force,
                Delay           = delay,
                Allow           = allow,
                Settings        = settings,
            };

            PlayerThrowGrenadeEvent?.Invoke(ev);

            force = ev.ForceMultiplier;
            delay = ev.Delay;
            allow = ev.Allow;
        }
Exemplo n.º 3
0
        internal static void InvokePlayerThrowGrenadeEvent(Player player, ItemType type, ref bool slow, ref double time, out bool allow)
        {
            allow = true;

            if (PlayerThrowGrenadeEvent == null)
            {
                return;
            }

            var ev = new PlayerThrowGrenadeEvent
            {
                Player   = player,
                Grenade  = type,
                Slow     = slow,
                FuseTime = time,
                Allow    = allow
            };

            PlayerThrowGrenadeEvent.Invoke(ev);

            allow = ev.Allow;
            slow  = ev.Slow;
            time  = ev.FuseTime;
        }