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

Comments for Timer

Return to Timer

A new version of this scenario was uploaded on Sun Mar 25 19:00:46 UTC 2012 I've changed the color changes - the green doesn't kick in until later on in the timer due to me changing the green gradient from linear to an effectively exponential method.
A new version of this scenario was uploaded on Sun Mar 25 23:09:09 UTC 2012 The world now resizes to whatever size the timer is
DutaDuta

2012/3/25

^Well, it doesn't actually resize, it pre-calculates the timer size and then makes the world that size
A new version of this scenario was uploaded on Mon Mar 26 07:44:15 UTC 2012 Change in the display
A new version of this scenario was uploaded on Mon Mar 26 11:23:55 UTC 2012 To make a timer you must create a sub-class of timer and override the abstract method onFinish(). Look at the source code for a better explanation
A new version of this scenario was uploaded on Mon Mar 26 16:24:35 UTC 2012 Extra example timer: "RemovingTimer2"
A new version of this scenario was uploaded on Mon Mar 26 16:28:01 UTC 2012 Gradient BG to demonstrate the fading.
A new version of this scenario was uploaded on Mon Mar 26 16:28:30 UTC 2012
A new version of this scenario was uploaded on Mon Mar 26 19:42:17 UTC 2012 Now has a game attached to demonstrate how you could use the timer in a game situation
A new version of this scenario was uploaded on Mon Mar 26 21:44:11 UTC 2012 Quick fix to something minor.
SyntacSyntac

2013/10/12

How can I set a world size? For example in a normal world I can change it with super(1350,900); but how do I change here the code so my game has the actual size of e.g 1350,900 ?
hasegawasubaruhasegawasubaru

2013/10/16

Hi, I have a question for this "Timer", how do you set the word "started" ? I want to make a timer for my game, but I don't dnow how to do it.
danpostdanpost

2013/10/16

@hasegawasubaru, you should start a new discussion thread rather than asking questions where comments should be. Explain exactly what you are looking for; including size and function of timer, what should be happening while the timer is running, the direction the timer runs, what should happen after specific times have elapsed, etc. If you have created a class to display the timer (one that extends Actor), show the code and explain how you are using the class. If you do not have a class for displaying the timer yet, start one and when you encounter problems, then start a discussion, giving what information and code is relevant and ask about specific things (not things in general).