Example #1
0
        private static void UpdateStates()
        {
            if (Controller.DPad.IsAnyPressed() || Controller.IsABXYPressed()) // Change mode command
            {
                uint key = 0;

                if (Controller.DPad.Up || Controller.X)
                {
                    CurrentMode = Orbwalking.OrbwalkingMode.Combo;
                    key         = Menu.Item("Orbwalk").GetValue <KeyBind>().Key;
                }
                else if (Controller.DPad.Left || Controller.A)
                {
                    CurrentMode = Orbwalking.OrbwalkingMode.LaneClear;
                    key         = Menu.Item("LaneClear").GetValue <KeyBind>().Key;
                }
                else if (Controller.DPad.Right || Controller.Y)
                {
                    CurrentMode = Orbwalking.OrbwalkingMode.Mixed;
                    key         = Menu.Item("Farm").GetValue <KeyBind>().Key;
                }
                else if (Controller.DPad.Down || Controller.B)
                {
                    CurrentMode = Orbwalking.OrbwalkingMode.LastHit;
                    key         = Menu.Item("LastHit").GetValue <KeyBind>().Key;
                }

                if (LastKey == key)
                {
                    return;
                }

                LastKey.Release();
                key.Press();
            }

            //Push any button to cancel mode
            if (Controller.LeftShoulder || Controller.RightShoulder || Controller.Back || Controller.Start || Controller.RightStick.Clicked)
            {
                CurrentMode = Orbwalking.OrbwalkingMode.None;
                LastKey.Release();
            }

            var s1 = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Summoner1);
            var s2 = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Summoner2);

            if (Controller.LeftTrigger > 0 && s1.State == SpellState.Ready)
            {
                SummonerCastLogic(s1);
            }

            if (Controller.RightTrigger > 0 && s2.State == SpellState.Ready)
            {
                SummonerCastLogic(s2);
            }

            Text.text = "MODE: " + CurrentMode;
            //OrbWalker.ActiveMode = CurrentMode;
        }
Example #2
0
        private static void UpdateStates()
        {
            //Push any button to cancel mode
            if (Controller.LeftShoulder || Controller.RightShoulder || Controller.Back || Controller.Start ||
                Controller.RightStick.Clicked)
            {
                SetOrbwalkingMode(Orbwalking.OrbwalkingMode.None);
                return;
            }

            if (Controller.DPad.IsAnyPressed() || Controller.IsABXYPressed()) // Change mode command
            {
                if (Controller.DPad.Up || Controller.X)
                {
                    SetOrbwalkingMode(Orbwalking.OrbwalkingMode.Combo);
                }
                else if (Controller.DPad.Left || Controller.A)
                {
                    SetOrbwalkingMode(Orbwalking.OrbwalkingMode.LaneClear);
                }
                else if (Controller.DPad.Right || Controller.Y)
                {
                    SetOrbwalkingMode(Orbwalking.OrbwalkingMode.Mixed);
                }
                else if (Controller.DPad.Down || Controller.B)
                {
                    SetOrbwalkingMode(Orbwalking.OrbwalkingMode.LastHit);
                }
            }

            var s1 = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Summoner1);
            var s2 = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Summoner2);

            if (Controller.LeftTrigger > 0 && s1.State == SpellState.Ready)
            {
                SummonerCastLogic(s1);
                return;
            }

            if (Controller.RightTrigger > 0 && s2.State == SpellState.Ready)
            {
                SummonerCastLogic(s2);
            }
        }