Sign in to follow this  
power2b

Show obstacles from bottom to top

Recommended Posts

Hello,

I am a newbie and trying to make a game like this one.

I've configured pretty much everything just this issue is impossible to make for me.

How do I generate those trees from bottom to the top?

i4D1Ac3.png

I would be really happy if someone could help me.

Thank you

Share this post


Link to post
Share on other sites

It could be something like

var trees = this.add.group(); // or: physicsGroup()

trees.createMultiple(12, 'tree', 0, true);
trees.scatter(); // in Phaser CE
trees.sort('y', Phaser.Group.SORT_ASCENDING);

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.