Jump to content

PhaserJS - Sprite hiding behind background


xronn
 Share

Recommended Posts

Hey,

 

Is there a z-index type function I can add to a sprite because I have the following code, but my title is hidden behind my background I can tell because when I comment my background the title is shown;

 

		this.add.sprite(10, 10, 'title');		this.add.sprite(100, 100, 'playButton', this.startGame);		this.background = this.add.sprite(0, 0, 'menuBackground');
		this.load.image('title', 'assets/imgs/titles.png');		this.load.image('playButton', 'assets/imgs/playButton.jpg');		this.load.image('menuBackground', 'assets/imgs/menuBackground.png');

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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