This site requires JavaScript, please enable it in your browser!
Greenfoot back
Maniak
Maniak wrote ...

2022/4/1

Close the game with a click.

Maniak Maniak

2022/4/1

#
I want to close the game with a click on a sertain object. I do know about the system.exit code, but is there a way to fully close the game or tell the pc to press alt+f4 if i click the object?
Jhonathan Jhonathan

2022/4/1

#
You can use isTouching and showText method for it
if(isTouching(Object.class))
  getWorld().showText("Press Alt+f4", x, y);
You need to login to post a reply.