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

Report as inappropriate.

Nolifer
Nolifer presents ...

2013/2/20

Fish

No description.

2852 views / 9 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game demo with-source

open in greenfoot
Your browser is ignoring the <APPLET> tag.
A new version of this scenario was uploaded on Sat Feb 23 18:29:58 UTC 2013 - added score counter - the game has more different sound tracks used
LinkmasterLinkmaster

2013/2/25

Gibts das Spiel auch zum Download?
NoliferNolifer

2013/2/25

skype: sheikas1
A new version of this scenario was uploaded on Tue Feb 26 19:20:12 UTC 2013 - added title - changed background - changed actor images
NoliferNolifer

2013/2/26

Maybe someone know how to fix scoreboard? Why it always shows 0 ?...
danpostdanpost

2013/2/26

The problem is not with your scoreboard. It is with your counter (or should I say counter[b][i]s[/i][/b]. You should only have one counter; either in the Pasaulis world class or in the Gyvanai actor class. If in the world class you will need another method to get either the counter itself or the value of the counter ('public Counter getCounter' or 'public int getCounterValue'). You must get a reference to this same counter anytime you wish to change or retrieve its value. My suggestion to you is to have it in the Pasaulis world class due to the fact that you are changing its value from one actor class and retrieving its value from another when the game ends. Go through your code and make sure you only have one Counter object. Also, there is no need to have a field for the Scoreboard object. When the game is decidedly over, get the value of the counter and create a new Scoreboard on the spot to add to the world.

Want to leave a comment? You must first log in.

Who likes this?

Linkmaster Prish950