Jump to content

ForceOrientation and Group Index


Recommended Posts

Hi there,


I have additional question about forceOrientation and Group index mechanism:

1. How do we use forceOrientation correctly in the game? I'm using forcePortrait inside the game but I don't see anything different when rotating my device.

2. I'm currently using Group to composite a game component (a puzzle tile with a separate sprite on top of it), but I seem can't order the child index of these Groups.


My current Group creation:

var tiles = this.game.add.group();
tiles.create(0,0, 'tile_bg');
tiles.create(0,0, 'tile_char');

My usual way for index sorting:

this.game.world.group.addAt(tiles, 1);



But I encounter error, Cannot read property 'onRemovedFromGroup' of undefined.

Any help will be appreciated.



Link to comment
Share on other sites

I'm moving to the latest master version (1.1), but now I can't found the global Group properties (previously accessible from this.game.world.group). Where can I access it now?

I also want try to find the container of my custom Group, but it seem I can't get their .group or .parent properties, any information regarding group and their container?

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