private static void DrawLineRectangle(Vector2 start, Vector2 end, int radius, int width, Color color) { var rectangle = new Geometry.Rectangle(start.To3D(), end.To3D(), radius); rectangle.ToPolygon().Draw(color); }
public void UpdatePolygon() { switch (SpellData.Type) { case SkillShotType.SkillshotCircle: Polygon = Circle.ToPolygon(); EvadePolygon = Circle.ToPolygon(15); PathFindingPolygon = Circle.ToPolygon(60); PathFindingInnerPolygon = Circle.ToPolygon(35); 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(15); PathFindingPolygon = Rectangle.ToPolygon(60); PathFindingInnerPolygon = Rectangle.ToPolygon(35); break; case SkillShotType.SkillshotMissileLine: Polygon = Rectangle.ToPolygon(); DrawingPolygon = Rectangle.ToPolygon( 0, !SpellData.AddHitbox ? SpellData.Radius : (SpellData.Radius - ObjectManager.Player.BoundingRadius)); EvadePolygon = Rectangle.ToPolygon(15); PathFindingPolygon = Rectangle.ToPolygon(60); PathFindingInnerPolygon = Rectangle.ToPolygon(35); break; case SkillShotType.SkillshotCone: Polygon = Sector.ToPolygon(); DrawingPolygon = Polygon; EvadePolygon = Sector.ToPolygon(15); PathFindingPolygon = Sector.ToPolygon(60); PathFindingInnerPolygon = Sector.ToPolygon(35); break; case SkillShotType.SkillshotRing: Polygon = Ring.ToPolygon(); DrawingPolygon = Polygon; EvadePolygon = Ring.ToPolygon(15); PathFindingPolygon = Ring.ToPolygon(60); PathFindingInnerPolygon = Ring.ToPolygon(35); break; case SkillShotType.SkillshotArc: Polygon = Arc.ToPolygon(); DrawingPolygon = Polygon; EvadePolygon = Arc.ToPolygon(15); PathFindingPolygon = Arc.ToPolygon(60); PathFindingInnerPolygon = Arc.ToPolygon(35); break; } }