1 decade ago by isaac
I am trying to spawn a same entity when I click on one on the screen.
eg. Spawn another entityA upon clicking entityA.
Since I want to have many of these to be done. I tried to not hardcode the function,
Instead, I tried to do
But then it says something like "this is not an object".
Is there a way to do it?
eg. Spawn another entityA upon clicking entityA.
Since I want to have many of these to be done. I tried to not hardcode the function,
eg. ig.game.spawnEntity(EntityA,x,y);
Instead, I tried to do
ig.game.spawnEntity(this,x,y)
But then it says something like "this is not an object".
Is there a way to do it?