Пример #1
0
        public static void InvokeTriggerTesla(GameObject player, bool isInHurtingRange, ref bool isTriggerable)
        {
            if (TriggerTeslaEvent == null)
            {
                return;
            }

            TriggerTeslaEvent ev = new TriggerTeslaEvent()
            {
                Player           = player.GetPlayer(),
                IsInHurtingRange = isInHurtingRange,
                Triggerable      = isTriggerable
            };

            TriggerTeslaEvent.Invoke(ref ev);

            isTriggerable = ev.Triggerable;
        }
Пример #2
0
        public static void InvokeTriggerTesla(GameObject obj, bool hurtRange, ref bool triggerable)
        {
            TriggerTesla triggerTesla = TriggerTeslaEvent;

            if (triggerTesla == null)
            {
                return;
            }

            TriggerTeslaEvent ev = new TriggerTeslaEvent()
            {
                Player      = Player.GetPlayer(obj),
                Triggerable = triggerable
            };

            triggerTesla?.Invoke(ref ev);
            triggerable = ev.Triggerable;
        }