Tracking actions for multiple game objects

My scene consists of multiple game objects that you can select and move like an RTS.

Currently I am adding a variable to track which object is selected and then moving it but it seems like a very obtuse way to do what I want.

Is there a more elegant solution? Would using Phaser.Physics.Arcade.Group help in my case?

My code can be found here:

1 Like

Hey There @DavidChan, I’m not sure if Phaser.Physics.Arcade.Group help you out with this but one thing that I though is, using signle references for objects that you have create, you can use an Array to store them, and move them accordingly, i believe it’s gonna free you creating lot’s of signle refences. :thinking: