Jump to content

game.add.group() - individual items positions in update function


Recommended Posts


if I have

intruders = game.add.group();

in create() functions,

and next I created eg. 3 items for(var i=0;i<3;i++) { intruders = game.add.sprite(100*i, 500, 'intruder'); }

- how I can set individual move animation position in upadate function?


I know how to do it in array,
but I do not know if there will be optimally with phaser objects/functions
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...