Recycle Missiles

irongirong Member Posts: 41
edited November -1 in Working with GS (Mac)
Hello Guys,

To improve my performance and mem usage, i would like to recycle my missiles instead of spawning them. Let's lets it's a Shoot em up and my hero can fire missiles... there can be only 5 missiles at once on the scene. SO i am planning to just make them available when i start my scene...
I just don't have any idea of how to make them Fire one after the other... Firing at the good position X i think i can do... but firing one after the other... i don't see how to do that... thanks for your help guys

Comments

  • irongirong Member Posts: 41
    ok i did it : ( game.MissileCounT +1)%3

    and in each missile the rule : if MissileCount = 0 ; move etc...
Sign In or Register to comment.