Re: Newb Back Needing Help With Handles
Hi,
yeah, I suppose making the key press just spawn another enemy and add it into the array of handles would be a better approach in general.
If you made the moving boolean entirely global, then yes, it would of course control all of the enemies at once. Another possibility would be to make it a property of the enemy class instead. That way, it would be specific and separate for each instance of enemy. In any case though, there is no need to use it as an argument in the move method itself, that just provides no real use.
You could also get rid of it entirely. If you only wanted to make sure that the enemy doesn't start moving until spawned, well, then he doesn't, because since he's not there on the game board yet until he's been spawned, he can't actually move either. If you want to have other factors influencing when an enemy should start moving in the end product, you will probably need other decisions and if checks to compare more speci
fic circumstances anyway.
For the time being, you could pretty well just check the value of the timer.
Lukas
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector