Sign in to follow this  
TheGeekTechZone

some phaser functions crashing my game

Recommended Posts

It depends where you use them. Show your code please, so we can help you.

I am using them on the create function, if those functions work the same as bringToTop(); it should work because Im replacing bringToTop(); for sendToBack(); and it crashes

 

function create () {

 

enemy = game.add.sprite(103, 425, 'enemy', 'idle.png');// 325

enemy.name = 'enemy';

game.physics.enable(enemy, Phaser.Physics.ARCADE);

enemy.body.setSize(0,0);

enemy.scale.setTo(4, 4.3);// scale sprite image

enemy.anchor.setTo(0.5, 0.9);// move sprite image

enemy.sendToBack();

}

Share this post


Link to post
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.

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

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.