AkaCore.AkaLib.Evade.Skillshot.Skillshot C# (CSharp) Метод

Skillshot() публичный Метод

public Skillshot ( DetectionType detectionType, SpellData spellData, int startT, System.Vector2 start, System.Vector2 end, Obj_AI_Base unit ) : System
detectionType DetectionType
spellData SpellData
startT int
start System.Vector2
end System.Vector2
unit Obj_AI_Base
Результат System
        public Skillshot(
            DetectionType detectionType,
            SpellData spellData,
            int startT,
            Vector2 start,
            Vector2 end,
            Obj_AI_Base unit)
        {
            this.DetectionType = detectionType;
            this.SpellData = spellData;
            this.StartTick = startT;
            this.Start = start;
            this.End = end;
            this.Direction = (end - start).Normalized();
            this.Unit = unit;
            switch (spellData.Type)
            {
                case SkillShotType.SkillshotCircle:
                    this.Circle = new Geometry.Polygon.Circle(this.CollisionEnd, spellData.Radius, 22);
                    break;
                case SkillShotType.SkillshotLine:
                case SkillShotType.SkillshotMissileLine:
                    this.Rectangle = new Geometry.Polygon.Rectangle(this.Start, this.CollisionEnd, spellData.Radius);
                    break;
                case SkillShotType.SkillshotCone:
                    this.Sector = new Geometry.Polygon.Sector(
                        start,
                        this.CollisionEnd - start,
                        spellData.Radius * (float)Math.PI / 180,
                        spellData.Range,
                        22);
                    break;
                case SkillShotType.SkillshotRing:
                    this.Ring = new Geometry.Polygon.Ring(this.CollisionEnd, spellData.Radius, spellData.RingRadius, 22);
                    break;
                case SkillShotType.SkillshotArc:
                    this.Arc = new Geometry.Polygon.Arc(
                        start,
                        end,
                        Configs.SkillShotsExtraRadius + (int)ObjectManager.Player.BoundingRadius,
                        22);
                    break;
            }
            this.UpdatePolygon();
        }