Rose Game Solutions Posted December 13, 2018 Share Posted December 13, 2018 I'm using multiple scenes and trying to get a Heads Up Display (HUD) that is always active. I'm also using a sprite with anims. however, when I load the sprite into the scene, I get an error coming from animation. here's my HUD class: export default class HUDScene extends Phaser.Scene { constructor() { super({ key: "HUD", active: true }); } and in my create method I'm just doing a simple constructor call this.HUD = new HUD(this.matter.world, 0, 0); Is there another way to accomplish this? or, what am I missing/doing wrong? the animations work in my 'gameScene' but not in the -always active- HUD scene... Thanks! Quote Link to comment Share on other sites More sharing options...
B3L7 Posted December 13, 2018 Share Posted December 13, 2018 Make sure the HUD scene is added to the game config, then get rid of this.HUD = new HUD(this.matter.world, 0, 0); And add: this.scene.launch('HUD'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.