Refactoring EditableCanvas in DrawboxEditable and other classes

This commit is contained in:
2026-03-23 15:07:55 +03:00
parent 3b81412eb2
commit ab30acd69a
26 changed files with 498 additions and 186 deletions

View File

@ -8,7 +8,9 @@ public class HitboxRectangle extends Hitbox {
private List<Point> listPointsCartesian = new ArrayList<Point>();
private float widthHitbox = 0,heightHitbox = 0; // Ширина и высота хитбокса в декартовых координатах.
public HitboxRectangle(){
public HitboxRectangle(String shape, Entity owner){
super(shape);
setOwnerEntity(owner);
initListsPoints();
}
public HitboxRectangle(String shape,List<Point> listPointsIso,List<Point> listPointsCartesian){
@ -85,4 +87,8 @@ public class HitboxRectangle extends Hitbox {
public List<Point> getListPointsCartesian() {
return listPointsCartesian;
}
@Override
public String listPointsToString() {
return "Rectangle "+referencePoint.x+" "+referencePoint.y+" "+widthHitbox+" "+heightHitbox;
}
}