I have one sprite object in my Layout and its called Enemy. On simple button click here is my code
const inst = runtime.objects.Enemy.getAllInstances();
for(var i = 0; i < inst.length; i++)
inst[i].x += 10;
Is this how it is intended to be used if I wanna move all instances of this object or is there a shorter way to do it?