I have made the rocket game on green foot for two players and both rockets have their own individual counters and controls...How do can I make an individual bullet/shot for each rocket?
//Checks if the spacebar is down
private boolean spaceDown;
if (spaceDown != Greenfoot.isKeyDown("space"))
{
spaceDown = ! spaceDown;
//this is only when the spacebar is down
if ( ! spaceDown)
{
//This is for when the key is released
}
}
if (spaceDown != Greenfoot.isKeyDown("space"))
{
spaceDown = ! spaceDown;
//this is only when the spacebar is down
if ( ! spaceDown)
{
//This is for when the key is released
}
}