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

2014/9/8

I need Help adding time to a countdown clock

Can'tComplain Can'tComplain

2014/9/8

#
Will someone help me please? I need this ability When I click an object, I want it to add more time to a clock that is counting down How can I make this happen? Thanks in advance!!
Super_Hippo Super_Hippo

2014/9/8

#
In the object that you can click, you put this in the 'act' method:
if (Greenfoot.mouseClicked(this)) clock.add();
With 'clock' as the reference to the clock object. Maybe you save the reference in the world. Then you need to use this reference. In this case, the 'Clock' class needs to have a method called 'add'. Try it yourself as far as you can and then tell us with what exactly you need help.
You need to login to post a reply.