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

2013/5/21

Score Board

Gzuzfrk Gzuzfrk

2013/5/21

#
So ive been looking around for a scoreboard method that adds 100 points whenever an Alien class is detroyed and I cant find one. Does anyone know any?
bourne bourne

2013/5/21

#
Are you talking about the UserInfo scoreboard class? You should keep a local score int that you add to, and when you lose etc, you update the score to UserInfo (usually if greater than old score).
Gzuzfrk Gzuzfrk

2013/5/21

#
I mean the code for whenever the guy kills an alien then it will give him 100 points
bourne bourne

2013/5/21

#
int score = 0;

public void killedAlien()
{
    score += 100;
}
You need to login to post a reply.