コード例 #1
0
ファイル: BuildElement.cs プロジェクト: iJamesPHP/EloBuddy
        public BuildElement(BuildCreator bc, Menu menu, IItem item, int index, ShopActionType action)
        {
            this.action = action;
            this.bc     = bc;
            this.item   = item;
            p           = index;

            upBox     = new CheckBox("up", false);
            removeBox = new CheckBox("remove", false);
            itemName  = new Label(" ");
            costSlots = new Label(" ");

            var property2 = typeof(CheckBox).GetProperty("Size");

            property2.GetSetMethod(true).Invoke(itemName, new object[] { new Vector2(400, 0) });
            property2.GetSetMethod(true).Invoke(costSlots, new object[] { new Vector2(400, 0) });
            property2.GetSetMethod(true).Invoke(upBox, new object[] { new Vector2(40, 20) });
            property2.GetSetMethod(true).Invoke(removeBox, new object[] { new Vector2(80, 20) });


            menu.Add(position + "nam" + RandGen.r.Next(), itemName);
            menu.Add(position + "cs" + RandGen.r.Next(), costSlots);
            menu.Add(position + "up" + RandGen.r.Next(), upBox);
            menu.Add(position + "rem" + RandGen.r.Next(), removeBox);
            updateText();

            upBox.CurrentValue       = false;
            removeBox.CurrentValue   = false;
            upBox.OnValueChange     += upBox_OnValueChange;
            removeBox.OnValueChange += removeBox_OnValueChange;
            property = typeof(CheckBox).GetProperty("Position");
        }
コード例 #2
0
ファイル: BuildElement.cs プロジェクト: qkwlqk/EloBuddy
        public BuildElement(BuildCreator bc, Menu menu, LoLItem item, int index, ShopActionType action)
        {
            this.action = action;
            this.bc = bc;
            this.item = item;
            p = index;

            upBox = new CheckBox("up", false);
            removeBox = new CheckBox("remove", false);
            itemName = new Label(" ");
            costSlots = new Label(" ");

            PropertyInfo property2 = typeof (CheckBox).GetProperty("Size");

            property2.GetSetMethod(true).Invoke(itemName, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(costSlots, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(upBox, new object[] {new Vector2(40, 20)});
            property2.GetSetMethod(true).Invoke(removeBox, new object[] {new Vector2(80, 20)});


            menu.Add(position + "nam" + RandGen.r.Next(), itemName);
            menu.Add(position + "cs" + RandGen.r.Next(), costSlots);
            menu.Add(position + "up" + RandGen.r.Next(), upBox);
            menu.Add(position + "rem" + RandGen.r.Next(), removeBox);
            updateText();

            upBox.CurrentValue = false;
            removeBox.CurrentValue = false;
            upBox.OnValueChange += upBox_OnValueChange;
            removeBox.OnValueChange += removeBox_OnValueChange;
            property = typeof (CheckBox).GetProperty("Position");
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: qkwlqk/EloBuddy
        private static void Start()
        {
            RandGen.Start();
            bool generic = false;
            switch (ObjectManager.Player.Hero)
            {
                case Champion.Ashe:
                    myChamp = new Ashe();
                    break;
                case Champion.Caitlyn:
                    myChamp = new Caitlyn();
                    break;
                default:
                    generic = true;
                    myChamp = new Generic();
                    break;
                case Champion.Ezreal:
                    myChamp = new Ezreal();
                    break;
                case Champion.Cassiopeia:
                    myChamp = new Cassiopeia();
                    break;
            }
            CustomLvlSeq cl = new CustomLvlSeq(menu, AutoWalker.p, Path.Combine(Environment.GetFolderPath(
            Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Skills"));
            if (!generic)
            {
                BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                    Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"), myChamp.ShopSequence);
            }


            else
            {
                myChamp = new Generic();
                if (MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName) != null &&
                    MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName).Get<Label>("shopSequence") != null)
                {
                    Chat.Print("Autobuddy: Loaded shop plugin for " + ObjectManager.Player.ChampionName);
                    BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                        Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"),
                        MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName)
                            .Get<Label>("shopSequence")
                            .DisplayName);
                }
                else
                {
                    BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                        Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"), myChamp.ShopSequence);
                }
            }
            Logic = new LogicSelector(myChamp, menu);
            new Disrespekt();
            Telemetry.SendEvent("GameStart", new Dictionary<string, string>()
            {
                {"GameChamp", AutoWalker.p.ChampionName},
                {"GameType", BrutalExtensions.GetGameType()},
                {"GameRegion", Game.Region},
                {"GameID", ""+AutoWalker.GameID},
            });
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: mariogk/Hu3
        private static void Start()
        {
            RandGen.Start();
            bool generic = false;
            switch (ObjectManager.Player.Hero)
            {
                case Champion.Ashe:
                    myChamp = new Ashe();
                    break;
                case Champion.Caitlyn:
                    myChamp = new Caitlyn();
                    break;
                default:
                    generic = true;
                    myChamp = new Generic();
                    break;
                case Champion.Ezreal:
                    myChamp = new Ezreal();
                    break;
                case Champion.Cassiopeia:
                    myChamp = new Cassiopeia();
                    break;
            }
            CustomLvlSeq cl = new CustomLvlSeq(menu, AutoWalker.p, Path.Combine(Environment.GetFolderPath(
            Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Skills"));
            if (!generic)
            {
                BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                    Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"), myChamp.ShopSequence);
            }


            else
            {
                myChamp = new Generic();
                if (MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName) != null &&
                    MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName).Get<Label>("shopSequence") != null)
                {
                    Chat.Print("Autobuddy: Loaded shop plugin for " + ObjectManager.Player.ChampionName);
                    BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                        Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"),
                        MainMenu.GetMenu("AB_" + ObjectManager.Player.ChampionName)
                            .Get<Label>("shopSequence")
                            .DisplayName);
                }
                else
                {
                    BuildCreator bc = new BuildCreator(menu, Path.Combine(Environment.GetFolderPath(
                        Environment.SpecialFolder.ApplicationData), "AutoBuddy\\Builds"), myChamp.ShopSequence);
                }
            }
            Logic = new LogicSelector(myChamp, menu);
        }