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

2024/5/7

I need help with my code

GrDan GrDan

2024/5/7

#
if(isTouching(ship.class)) { removeTouching(ship.class); GameOver gameover = new GameOver(); addObject(gameover, 500, 150); It tells me something is wrong with addObject
Super_Hippo Super_Hippo

2024/5/7

#
You need to get a reference to the world to add the object to the world. An actor can receive a reference to the world it is currently in with the ‘getWorld’ method.
You need to login to post a reply.