Jump to content

Can groups be used to position/move sprites?


gotsanity
 Share

Recommended Posts

I am fairly new to phaser. I am currently working on a card game using phaser and I am trying to work out how to best position sprites in zones around the board. My tests this far have revolved around hardcoding positions on the screen and that has been a math-tastic nightmare. I am building two decks of cards on either side of the screen. Then I am dropping several other cards onto the board in a row. The two decks of cards when clicked will be added to two seperate zones (one hand and one play). So, my thought process is as follows:

Load all sprites

Assign sprites by starting position into starting groups

when a card is clicked add that card to the appropriate group

use the group to determine the position within the bounds of the group (checking for overlap, etc).

 

Does this seem like an appropriate way of handling it? If not, what would you suggest?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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