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

2013/10/28

space game help

KevinWelch2001 KevinWelch2001

2013/10/28

#
I am making a space game. when the spaceship hits a asteroid it destroys the asteroid, but I want it so it will also make the spaceship blow up after a couple of asteroids hit it.
danpost danpost

2013/10/28

#
Sounds like you will need an instance field in the class of the spaceship to count the number of asteroid hits; and then some code to check its value to see if the ship needs to blow up.
KevinWelch2001 KevinWelch2001

2013/10/28

#
I am new to java. can you show me what that would look like.
danpost danpost

2013/10/28

#
It might be a good idea to go over the first few section in the Java trail called Learning the Java Language
KevinWelch2001 KevinWelch2001

2013/10/28

#
ty.
You need to login to post a reply.