This commit is contained in:
2025-10-22 10:54:21 +02:00
parent 550f552097
commit 9a81ee736e
3 changed files with 76 additions and 25 deletions

View File

@@ -24,6 +24,8 @@ public class MuehleButton {
public boolean isActive = true;
public boolean isDestroyed = false;
public MuehleButton(int id,int relX, int relY, double absX, double absY, Game game) {
this.id = id;
@@ -59,6 +61,16 @@ public class MuehleButton {
circle.setFill(Color.rgb(0,255,0));
}
}
public void destroy( ) {
isDestroyed = true;
circle.setFill(Color.rgb(0,0,0,0));
} // end of if-else
public void create() {
isDestroyed = false;
circle.setFill(this.color);
}
EventHandler<MouseEvent> mouse_click_target = new EventHandler<MouseEvent>() {
public void handle(MouseEvent event) {