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


Collisions in a game

JessikaJobe JessikaJobe


I am setting up a game and rather than having the game count how many times the bird eats the worm, I just want it to count how many times they collide but I dont know what word to use in place of eat(Worm.class) I know how to set up the rest to count everything I am just not sure what word I use instead of "eat"
davmac davmac


You can probably use "getOneIntersectingObject(Worm.class)". It returns null if there is no worm visible. See:
You need to login to post a reply.