Example #1
0
 public void UpdatePolygon()
 {
     switch (SpellData.Type)
     {
         case SkillShotType.SkillshotCircle:
             Polygon = Circle.ToPolygon();
             EvadePolygon = Circle.ToPolygon(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(ExtraEvadeDistance);
             break;
         case SkillShotType.SkillshotMissileLine:
             Polygon = Rectangle.ToPolygon();
             DrawingPolygon = Rectangle.ToPolygon(
                 0,
                 !SpellData.AddHitbox
                     ? SpellData.Radius
                     : (SpellData.Radius - ObjectManager.Player.BoundingRadius));
             EvadePolygon = Rectangle.ToPolygon(ExtraEvadeDistance);
             break;
         case SkillShotType.SkillshotCone:
             Polygon = Sector.ToPolygon();
             DrawingPolygon = Polygon;
             EvadePolygon = Sector.ToPolygon(ExtraEvadeDistance);
             break;
         case SkillShotType.SkillshotRing:
             Polygon = Ring.ToPolygon();
             DrawingPolygon = Polygon;
             EvadePolygon = Ring.ToPolygon(ExtraEvadeDistance);
             break;
     }
 }
Example #2
0
 private void UpdatePolygon()
 {
     switch (this.SpellData.Type)
     {
         case SkillShotType.SkillshotCircle:
             this.Circle.UpdatePolygon();
             this.Polygon = this.Circle;
             break;
         case SkillShotType.SkillshotLine:
         case SkillShotType.SkillshotMissileLine:
             this.Rectangle.UpdatePolygon();
             this.Polygon = this.Rectangle;
             break;
         case SkillShotType.SkillshotCone:
             this.Sector.UpdatePolygon();
             this.Polygon = this.Sector;
             break;
         case SkillShotType.SkillshotRing:
             this.Ring.UpdatePolygon();
             this.Polygon = this.Ring;
             break;
         case SkillShotType.SkillshotArc:
             this.Arc.UpdatePolygon();
             this.Polygon = this.Arc;
             break;
     }
 }