Refactoring ClearButton. Made by drawing CircleHitbox. Need to finish doing HitboxCircleRenderingFunction and saving hitboxCircle when you put the second point

This commit is contained in:
2026-04-01 18:20:08 +03:00
parent 6665199d12
commit 58550ae93a
16 changed files with 141 additions and 40 deletions

View File

@ -32,7 +32,7 @@ public class HitboxRectengleRenderingFunction implements ShapeRenderingFunction
return LocalListPointsCartesian;
}
public void setFirstIsoPointIsNull(){
private void setFirstIsoPointIsNull(){
firstIsoPoint = null;
}
@ -112,7 +112,7 @@ public class HitboxRectengleRenderingFunction implements ShapeRenderingFunction
}
}
public void setEntityInHtiboxRectengle(Entity e) {
public void setEntityInHitboxRectengle(Entity e) {
entity = e;
}
@ -151,5 +151,15 @@ public class HitboxRectengleRenderingFunction implements ShapeRenderingFunction
Hitbox.cartesianToIsometric(cartesianPoint.x,cartesianPoint.y,LocalListPointsIso.get(i));
}
}
@Override
public void functionClearJButton() {
HitboxRectangle nowHitbox = (HitboxRectangle)entity.getHitbox();
nowHitbox.getListPointsIso().clear();
nowHitbox.getListPointsCartesian().clear();
LocalListPointsCartesian.clear();
LocalListPointsIso.clear();
setFirstIsoPointIsNull();
}
}