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

2018/2/1

How to make 3 different timers for 3 different game modes

frequency frequency

2018/2/1

#
Hello, This is the scenario! http://www.greenfoot.org/scenarios/20776 I want to make a timer that goes 90-1-1-1 60-1-1-1 30-1-1-1 The classes are in the scenario! I must end this by tomorrow so any help is really appreciated!
danpost danpost

2018/2/1

#
In the Timer class constructor, you can calculate the final time the timer should finish at. If that time was kept in a field, you could at any time determine how many seconds remain. Displaying the remaining time in tenths of a second would be optimal (at least for when the time remaining is under 10 seconds). The length of time the timer is to run can be passed to it using a constructor parameter.
frequency frequency

2018/2/1

#
So,what should i write into then?
danpost danpost

2018/2/1

#
frequency wrote...
So,what should i write into then?
For now, just do 3 timer classes, one for each amount of time.
frequency frequency

2018/2/1

#
Yes,i made them and also added some code from school inside them.Take a peek http://www.greenfoot.org/scenarios/20777
danpost danpost

2018/2/1

#
frequency wrote...
Yes,i made them and also added some code from school inside them.Take a peek http://www.greenfoot.org/scenarios/20777
They should extend Actor -- not the buttons Also, they should not be given the button images as their images will be text that is continually updated (like the score text).
frequency frequency

2018/2/1

#
Done,removed the images and now they extend from actor. Now what do i do?
You need to login to post a reply.