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!!
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.