Trying to create a counter for assignment! -
06-25-2010, 01:29 PM
Disappearing Act: Create a world with an array containing several different types of bugs (Animals / Bugs), other animals, people, or other objects of your choice. Include at least five objects in total. The objects should all move in different random directions. Hint: see the Random motion section in Ch. 6 of Learning to Program with Alice. Setup multiple events (when clicked) for each object that triggers a common method to make the object disappear. Use the IsShowing property to make the objects disappear. Your program should terminate when all bugs are disappear (i.e. have a counter that gets decremented each time a bug disappears).
I already have an array, the different objects moving in random directions, and I even know how to make them disappear when a mouse is clicked on the object. What I don't understand how to do is make a counter that gets decremented each time a bug disappears. Can someone point me in the right direction for creating a counter? Here's my world so that y'all do not think I am cheating or trying to take credit for someone's else work.
|