Пример #1
0
    public override void Execute(Steerable steerable)
    {
        base.Execute(steerable);

        // Retrieve the amount of light energy possessed by the NPC performing this action
        float myLightEnergy = steerable.GetComponent <LightSource>().LightEnergy.CurrentEnergy;

        if (targetLightSource)
        {
            // If this fish has less light than its target
            if (!alwaysSeek && (myLightEnergy < targetLightSource.LightEnergy.CurrentEnergy || alwaysFlee))
            {
                // Flee the light source since it is stronger than this fish
                fleeWhenWeaker.Execute(steerable);

                //Debug.Log("FLEE THE FISH: " + targetLightSource.name);
            }
            // Else, if this fish has more light than its target
            else
            {
                // Seek the light source
                seekWhenStronger.Execute(steerable);
            }
        }
        else
        {
            // If the light source has been destroyed, stop performing this action.
            ActionCompleted();
        }

        wallAvoidance.Execute(steerable);
    }
Пример #2
0
        private static void OnUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                Combo.Execute();
            }

            if (Config.IsChecked("bW") && Spells.W.CanCast() &&
                ObjectManager.Player.ManaPercent >= Config.GetSliderValue("AutoW.minMana"))
            {
                AutoW.Execute();
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                ObjectManager.Player.ManaPercent >= Config.GetSliderValue("Harass.minMana"))
            {
                Harass.Execute();
            }

            if (Config.IsKeyPressed("assistedR"))
            {
                AssistedR.Execute();
            }

            if (Config.IsKeyPressed("fleeBind"))
            {
                Orbwalking.MoveTo(Game.CursorPos);
                Flee.Execute();
            }
        }
Пример #3
0
        private static void OnTick(EventArgs args)
        {
            PermaActive.Execute();

            if (Activemode(Orbwalker.ActiveModes.Combo))
            {
                switch (Mode)
                {
                case 1:
                    Combo.Execute();
                    break;

                case 2:
                    Burst.Execute();
                    break;
                }
            }

            if (Activemode(Orbwalker.ActiveModes.JungleClear))
            {
                Jungle.Execute();
            }

            if (Activemode(Orbwalker.ActiveModes.LaneClear))
            {
                Lane.Execute();
            }

            if (Activemode(Orbwalker.ActiveModes.Flee))
            {
                Flee.Execute();
            }
        }
Пример #4
0
        private static void OnTick(EventArgs args)
        {
            if (Return.Activemode(Orbwalker.ActiveModes.Combo))
            {
                Combo.Execute();
            }

            if (Return.Activemode(Orbwalker.ActiveModes.Harass))
            {
                Harass.Execute();
            }

            if (Return.Activemode(Orbwalker.ActiveModes.LaneClear))
            {
                Clear.Execute();
            }

            if (Return.Activemode(Orbwalker.ActiveModes.JungleClear))
            {
                Jungle.Execute();
            }

            if (Return.Activemode(Orbwalker.ActiveModes.LastHit))
            {
                Lasthit.Execute();
            }

            if (Return.Activemode(Orbwalker.ActiveModes.Flee))
            {
                Flee.Execute();
            }


            PermaActive.Execute();
        }
Пример #5
0
 public void OnFlee()
 {
     if (E.State == SpellState.Ready || E.State == SpellState.Surpressed)
     {
         flee.Execute();
     }
 }
Пример #6
0
        private static void OnTick(EventArgs args)
        {
            if (Player.Instance.IsDead)
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo.Execute();
            }

            if (Config.IsChecked(Config.AutoWMenu, "bW") && Spells.W.CanCast() &&
                Player.Instance.ManaPercent >= Config.GetSliderValue(Config.AutoWMenu, "minMana"))
            {
                AutoW.Execute();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) &&
                Player.Instance.ManaPercent >= Config.GetSliderValue(Config.HarassMenu, "minMana"))
            {
                Harass.Execute();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                Flee.Execute();
            }
        }
 /// <summary>
 /// Ejecuta el estado.
 /// </summary>
 public override void Execute()
 {
     flee.Execute(zombie.transform);
     timerExitState += Time.deltaTime;
     if (timerExitState >= 3)
     {
         zombie.SeekHuman();
     }
     base.Execute();
 }
Пример #8
0
        public static void OnTick(EventArgs args)
        {
            if (Player.Instance.IsDead || Player.Instance.IsRecalling())
            {
                return;
            }

            PermaActive.Execute();
            var flags = Orbwalker.ActiveModesFlags;

            #region Flags checker
            if (flags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                try
                {
                    Combo.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            if (flags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                try
                {
                    Harass.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            if (flags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                try
                {
                    LastHit.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            if (flags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                try
                {
                    LaneClear.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            if (flags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                try
                {
                    JungleClear.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            if (flags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                try
                {
                    Flee.Execute();
                }
                catch (Exception e)
                {
                    Console.WriteLine("{0} Exception caught.", e);
                }
            }
            #endregion
        }
Пример #9
0
 public override void Execute()
 {
     flee.Execute(humano.transform);
     base.Execute();
 }