Ejemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     anim = GetComponent <Animator>();
 }
Ejemplo n.º 2
0
        private static void OnUpdate(EventArgs args)
        {
            int i = 0;

            foreach (Obj_AI_Hero hero in heroes)
            {
                if (hero.Experience != lastexp[i])
                {
                    lastgain[i] = hero.Experience - lastexp[i];
                    lastexp[i]  = hero.Experience;
                    if (miniondied[i].X != 0)
                    {
                        if (lastgain[i] * 1.02f < expectedgain[i])
                        {
                            danger s;
                            s.pos   = miniondied[i];
                            s.time  = Game.Time + duration;
                            s.hero  = hero;
                            s.count = lastgain[i] / expectedgain[i] < .63f;
                            if (debug.GetValue <Boolean>())
                            {
                                Game.PrintChat(lastgain[i] + "  " + expectedgain[i]);
                            }
                            dangers         = s;
                            miniondied[i].X = 0;
                        }
                    }
                }
                if (hero.IsMe)
                {
                    myhero = hero;
                }
                i++;
            }
            if (skip == 500)
            {
                range    = Menu.Item("range").GetValue <Slider>().Value;
                duration = Menu.Item("duration").GetValue <Slider>().Value;
                minionz  = new List <Obj_AI_Minion>();
                foreach (Obj_AI_Minion minion in ObjectManager.Get <Obj_AI_Minion>())
                {
                    if (minion.BaseSkinName[4].Equals(x))
                    {
                        minionz.Add(minion);
                    }
                }
                skip = 0;
            }

            skip++;
        }
Ejemplo n.º 3
0
        private static void OnUpdate(EventArgs args)
        {
            int i = 0;
            foreach (Obj_AI_Hero hero in heroes)
            {
                if (hero.Experience != lastexp[i])
                {
                    lastgain[i] = hero.Experience - lastexp[i];
                    lastexp[i] = hero.Experience;
                    if (miniondied[i].X != 0)
                    {
                        if (lastgain[i] * 1.02f < expectedgain[i])
                        {
                            danger s;
                            s.pos = miniondied[i];
                            s.time = Game.Time + duration;
                            s.hero = hero;
                            s.count = lastgain[i]/expectedgain[i]<.63f;
                            if (debug.GetValue<Boolean>())
                                Game.PrintChat(lastgain[i] +"  "+ expectedgain[i]);
                            dangers = s;
                            miniondied[i].X = 0;
                        }
                    }
                }
                if (hero.IsMe)
                    myhero = hero;
                i++;
            }
            if (skip == 500)
            {
                range = Menu.Item("range").GetValue<Slider>().Value;
                duration = Menu.Item("duration").GetValue<Slider>().Value;
                minionz = new List<Obj_AI_Minion>();
                foreach (Obj_AI_Minion minion in ObjectManager.Get<Obj_AI_Minion>())
                    if (minion.BaseSkinName[4].Equals(x))
                        minionz.Add(minion);
                skip = 0;
            }

            skip++;
        }