Saturday, November 21, 2009

Case 08

Arrays and timers. What are these you may ask. Well I'll tell ya. Say you want multiple objectes to be created in the scene. In stead of writing 3134 lines of code, you can simply bake one array on a couple of lines that create a set number of objects. Timers are just that; timers. If you want to make something happen for a period of time you need a timer, if you need something to happen after a period of time you ned a timer.
Timers are basically stopwatches you can attach to things, and give them a duration, or whatever you want.

The thing I wanna use this stuff for if for my newly created enemy class. I'm gonna try to use arrays to spawn a set number of enemies on random locations each time.
I'm then going to try to make the player character blink a couple of times when hit by enemies by using timers.

No comments:

Post a Comment