Exemplo n.º 1
0
        public static KatarinaDagger GetFixedDagger(Obj_AI_Base target)
        {
            KatarinaDagger FixedDagger = new KatarinaDagger {
                Dagger = null, CreationTime = 0
            };
            var FixedDaggerA = PickableDaggers.Where(x => x.Dagger.Position.Distance(target.Position) <= 450).MinOrDefault(x => x.Dagger.Position.Distance(target.Position));

            if (FixedDaggerA != null)
            {
                FixedDagger = FixedDaggerA;
            }
            return(FixedDagger);
        }
Exemplo n.º 2
0
        public static void CastEFixedDagger(KatarinaDagger dagger, Obj_AI_Base target)
        {
            var     distance = dagger.Dagger.Position.Distance(target.Position);
            Vector2 castpos  = new Vector2();

            if (distance > 150)
            {
                castpos = dagger.Dagger.Position.To2D().Extend(target.Position.To2D(), 150);
            }
            else
            {
                castpos = target.Position.To2D().Extend(dagger.Dagger.Position.To2D(), 10);
            }
            E.Cast(castpos);
        }