Re: Newb Back Needing Help With Handles
Oh, I see the issue now. You do call the enemy move method from inside a loop, but only when you actually press the key. That's to be expected in that case. So, I was right in a sort of way before, just expressed my point poorly.
Either give up on this approach to enemy movement entirely and make them move automatically through an if check in the loop, i.e. call the correspondingly modified move method every x milliseconds directly from within the loop, or make the bool moving argument global to the entire enemy class instead of just belonging to the move method. Like this, it's of absolutely no use to you at the moment. If you did this, you would then do the following in your main loop, besides keyboard commands:
if (standard.moving) standard.move();
It's not a very good approach but hey, it would work. I assume the entire single enemy handle called standard and the key that's supposed to trigger the looping movement are all there just for tes ting purposes anyway.
Hope this helps,
Lukas
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector