Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Champions champion = new Champions();

            champion.printNumberOfChampions();

            // Calls default base class
            Jungler jungle1 = new Jungler();

            jungle1.printNumberOfChampions();

            // Calls child class with 2 params
            Jungler jungle2 = new Jungler(200000000, 29);

            jungle2.printNumberOfChampions();

            MyTopJungler topjungle = new MyTopJungler();

            topjungle.printLengthOfChamp();
            topjungle.printUpperCaseOfChampName();

            TopLaner toplane = new TopLaner();

            toplane.SomeTopLaners();


            Console.ReadLine();
        }
Ejemplo n.º 2
0
    public object Create(object Enum)
    {
        EnumHeroes code = (EnumHeroes)Enum;
        IHero      hero = null;

        switch (code)
        {
        case EnumHeroes.Carry:
            hero = new Carry();
            break;

        case EnumHeroes.Disabler:
            hero = new Disabler();
            break;

        case EnumHeroes.Jungler:
            hero = new Jungler();
            break;

        case EnumHeroes.Nucker:
            hero = new Nucker();
            break;

        case EnumHeroes.Roamer:
            hero = new Roamer();
            break;

        case EnumHeroes.Support:
            hero = new Support();
            break;

        case EnumHeroes.Tank:
            hero = new Tank();
            break;
        }
        SetHeroStats(ref hero, GetJsonParams(code));
        return(hero);
    }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor GLONASS
        /// </summary>
        /// <param name="core">Core object (базовый объект плугина)</param>
        /// <param name="dbpath">gps database file</param>
        /// <param name="inDEBUG">debugging mode</param>
        /// <seealso cref="Jungler.Bot.Classes.Core" /><seealso cref="Jungler.Bot.Classes.Gps"/>
        public GLONASS(Jungler.Bot.Classes.Core core, string dbpath = null, bool inDEBUG = false)
        {
            this.DEBUG = inDEBUG;
            //AppDomain currentDomain = AppDomain.CurrentDomain;
            //currentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
            if (automove_sleep < core.pingToServer) automove_sleep = 50;
            this._core = core;
            this.dmax = 20;
            this.ptickets = new List<PauseTicket> { };
            lasterror = GLONASSLastError.None;
            this.random = new Random(System.DateTime.Now.Millisecond);
            try {
                //this.G = Graph.LoadFromFile(dbpath);
                this.G = new Graph { };
                if (dbpath != null) this.LoadFromDb(dbpath);
                Dbg("Loaded " + G.Nodes.Count + " nodes, " + G.Arcs.Count + " arcs.");
            } catch (Exception ing) {
                Err("Graph not loaded: " + ing.Message);
                this.G = new Graph { };

            }
            SetMe();
            next = null;
            next2 = null;
            prev = null;
            this.actions = new Dictionary<Point3D, Tuple<ushort, Action<Point3D>>> { };
            this.path = new List<Point3D> { };
            this.AS = new AStar(this.G);
            AS.ChoosenHeuristic = AStar.ManhattanHeuristic;
            AS.DijkstraHeuristicBalance = 0.5;
            this.automovestatus = 2;
            this.autorotatestatus = 2;
            this.autobuffstatus = 2;
            TaskStart(ref this.automove, this.AutoMoving);
            TaskStart(ref this.autorotate, this.AutoRotation);
            TaskStart(ref this.autobuff, this.MovingBuffs);
            Thread.Sleep(50);
            //
        }