Jump to content

adding information to sprite to use in collision


Recommended Posts

I am wanting to add information to a sprite to look at in a collision

walker = game.add.sprite(walkerx,walkery,'walker');

 walker.alive =1;

In my collision code

I want to do if (body2.alive==1)

But it does not affect the code when I force it crash there - and look at the body2 object I don't see a alive property.


BTW this is my third phaser game. Loving it

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...