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

2013/11/3

asteroids Score Board

1
2
erdelf erdelf

2013/11/3

#
so your gameover class is the one creating the scoreboard,
addObject(new Scoreboard(getCounter().getValue()), getWidth()/2, getHeight()/2);
taky123 taky123

2013/11/3

#
were should i place this ????
taky123 taky123

2013/11/3

#
i did so but nothing appeared at all
erdelf erdelf

2013/11/3

#
oh, in the game over method, sry for notanswering
taky123 taky123

2013/11/3

#
i did but nothing appeared i dont know why ???
taky123 taky123

2013/11/3

#
should i post the game with the code and have you look at it ?? it will be on my account ..
taky123 taky123

2013/11/3

#
http://www.greenfoot.org/scenarios/9844
taky123 taky123

2013/11/3

#
sorry thats not it
taky123 taky123

2013/11/3

#
http://www.greenfoot.org/scenarios/9845
erdelf erdelf

2013/11/3

#
change the explode method of the rocket to this
      Asteroid asteroid = (Asteroid) getOneIntersectingObject(Asteroid.class);
     if (touched && asteroid == null)
     {
        touched = false;
     }
     else if(!touched && asteroid != null)
     {
         getWorld().addObject( new Explosion(), getX(), getY());
         ((Space)getWorld()).gameOver();
         getWorld().removeObject(this);
         touched = true;
     }
taky123 taky123

2013/11/3

#
OMG thanks it works your a life savior dude i dont know how to thank you :D
You need to login to post a reply.
1
2