示例#1
0
        public static List <PassiveObject> GetPassiveObjects()
        {
            List <PassiveObject> PassiveObjects = new List <PassiveObject>();

            foreach (var x in FioraPrePassiveObjects.Where(i => i != null && i.IsValid))
            {
                PassiveObjects.Add(new PassiveObject(x.Name, x, PassiveType.PrePassive, GetPassiveDirection(x)));
            }
            foreach (var x in FioraPassiveObjects.Where(i => i != null && i.IsValid))
            {
                PassiveObjects.Add(new PassiveObject(x.Name, x, PassiveType.NormalPassive, GetPassiveDirection(x)));
            }
            foreach (var x in FioraUltiPassiveObjects.Where(i => i != null && i.IsValid))
            {
                PassiveObjects.Add(new PassiveObject(x.Name, x, PassiveType.UltiPassive, GetPassiveDirection(x)));
            }
            return(PassiveObjects);
        }
示例#2
0
        public static Vector3 passivepos(Obj_AI_Base target)
        {
            var passive  = FioraPassiveObjects.Where(x => x.Position.Distance(target.Position) <= 50).FirstOrDefault();
            var Position = Prediction.GetPrediction(target, 0.25f).UnitPosition;

            if (passive != null)
            {
                if (passive.Name.Contains("NE"))
                {
                    var pos = new Vector2();
                    pos.X = Position.To2D().X;
                    pos.Y = Position.To2D().Y + 150;
                    return(pos.To3D());
                }
                if (passive.Name.Contains("SE"))
                {
                    var pos = new Vector2();
                    pos.X = Position.To2D().X - 150;
                    pos.Y = Position.To2D().Y;
                    return(pos.To3D());
                }
                if (passive.Name.Contains("NW"))
                {
                    var pos = new Vector2();
                    pos.X = Position.To2D().X + 150;
                    pos.Y = Position.To2D().Y;
                    return(pos.To3D());
                }
                if (passive.Name.Contains("SW"))
                {
                    var pos = new Vector2();
                    pos.X = Position.To2D().X;
                    pos.Y = Position.To2D().Y - 150;
                    return(pos.To3D());
                }
                return(new Vector3());
            }
            return(new Vector3());
        }
示例#3
0
        public static List <Vector3> PassiveRadiusPoint(Obj_AI_Base target)
        {
            var passive  = FioraPassiveObjects.Where(x => x.Position.Distance(target.Position) <= 50).FirstOrDefault();
            var Position = Prediction.GetPrediction(target, 0.25f).UnitPosition;

            if (passive != null)
            {
                if (passive.Name.Contains("NE"))
                {
                    var pos1 = new Vector2();
                    var pos2 = new Vector2();
                    pos1.X = Position.To2D().X + 150 / (float)Math.Sqrt(2);
                    pos2.X = Position.To2D().X - 150 / (float)Math.Sqrt(2);
                    pos1.Y = Position.To2D().Y + 150 / (float)Math.Sqrt(2);
                    pos2.Y = Position.To2D().Y + 150 / (float)Math.Sqrt(2);
                    return(new List <Vector3>()
                    {
                        pos1.To3D(), pos2.To3D()
                    });
                }
                if (passive.Name.Contains("SE"))
                {
                    var pos1 = new Vector2();
                    var pos2 = new Vector2();
                    pos1.X = Position.To2D().X - 150 / (float)Math.Sqrt(2);
                    pos2.X = Position.To2D().X - 150 / (float)Math.Sqrt(2);
                    pos1.Y = Position.To2D().Y - 150 / (float)Math.Sqrt(2);
                    pos2.Y = Position.To2D().Y + 150 / (float)Math.Sqrt(2);
                    return(new List <Vector3>()
                    {
                        pos1.To3D(), pos2.To3D()
                    });
                }
                if (passive.Name.Contains("NW"))
                {
                    var pos1 = new Vector2();
                    var pos2 = new Vector2();
                    pos1.X = Position.To2D().X + 150 / (float)Math.Sqrt(2);
                    pos2.X = Position.To2D().X + 150 / (float)Math.Sqrt(2);
                    pos1.Y = Position.To2D().Y - 150 / (float)Math.Sqrt(2);
                    pos2.Y = Position.To2D().Y + 150 / (float)Math.Sqrt(2);
                    return(new List <Vector3>()
                    {
                        pos1.To3D(), pos2.To3D()
                    });
                }
                if (passive.Name.Contains("SW"))
                {
                    var pos1 = new Vector2();
                    var pos2 = new Vector2();
                    pos1.X = Position.To2D().X + 150 / (float)Math.Sqrt(2);
                    pos2.X = Position.To2D().X - 150 / (float)Math.Sqrt(2);
                    pos1.Y = Position.To2D().Y - 150 / (float)Math.Sqrt(2);
                    pos2.Y = Position.To2D().Y - 150 / (float)Math.Sqrt(2);
                    return(new List <Vector3>()
                    {
                        pos1.To3D(), pos2.To3D()
                    });
                }
                return(new List <Vector3>());
            }
            else
            {
                return(new List <Vector3>());
            }
        }