コード例 #1
0
ファイル: Skillshot.cs プロジェクト: Taazuma/EB-T
        public void UpdatePolygon()
        {
            switch (SpellData.Type)
            {
            case SkillShotType.SkillshotCircle:
                Polygon        = Circle.ToPolygon();
                EvadePolygon   = Circle.ToPolygon(Config.ExtraEvadeDistance);
                DrawingPolygon = Circle.ToPolygon(
                    0,
                    !SpellData.AddHitbox
                            ? SpellData.Radius
                            : (SpellData.Radius - ObjectManager.Player.BoundingRadius));
                break;

            case SkillShotType.SkillshotLine:
                Polygon        = Rectangle.ToPolygon();
                DrawingPolygon = Rectangle.ToPolygon(
                    0,
                    !SpellData.AddHitbox
                            ? SpellData.Radius
                            : (SpellData.Radius - ObjectManager.Player.BoundingRadius));
                EvadePolygon = Rectangle.ToPolygon(Config.ExtraEvadeDistance);
                break;

            case SkillShotType.SkillshotMissileLine:
                Polygon        = Rectangle.ToPolygon();
                DrawingPolygon = Rectangle.ToPolygon(
                    0,
                    !SpellData.AddHitbox
                            ? SpellData.Radius
                            : (SpellData.Radius - ObjectManager.Player.BoundingRadius));
                EvadePolygon = Rectangle.ToPolygon(Config.ExtraEvadeDistance);
                break;

            case SkillShotType.SkillshotCone:
                Polygon        = Sector.ToPolygon();
                DrawingPolygon = Polygon;
                EvadePolygon   = Sector.ToPolygon(Config.ExtraEvadeDistance);
                break;

            case SkillShotType.SkillshotRing:
                Polygon        = Ring.ToPolygon();
                DrawingPolygon = Polygon;
                EvadePolygon   = Ring.ToPolygon(Config.ExtraEvadeDistance);
                break;
            }
        }