Mizukage Posted October 25, 2015 Share Posted October 25, 2015 I didn't find how Phaser support this windows. When player click on button 'equipment' this eq window will be on screen until player close. It can be image on button click fadeIn and fadeOut, but must be some better way to do this. Link to comment Share on other sites More sharing options...
chongdashu Posted October 25, 2015 Share Posted October 25, 2015 I assume you're talking about user interfaces. You can just create a Phaser.Group of Phaser.Sprite, Phaser.Text, and Phaser.Button elements that will make up If you are specifically talking about animations, you can use Phaser.Tweens for things like fading in and fading out, popping in and popping out, etc. Mizukage 1 Link to comment Share on other sites More sharing options...
Mizukage Posted October 25, 2015 Author Share Posted October 25, 2015 Thanks for tip, i make this menu ui/ux and working fine characterMenu: function () { this.menuOn = true; playerMenu = this.game.add.sprite(this.game.camera.x + 30, this.game.camera.y + 120, 'playerMenu'); close = this.game.add.button(this.game.camera.x + 215, this.game.camera.y + 123, "close", this.characterMenuClose, this); menuTextWeapon = this.game.add.text(this.game.camera.x + 40, this.game.camera.y + 415, "Weapon - "+this.player.weapon.name, { font: "18px Arial", fill: "#000", align: "center" }); menuTextStr = this.game.add.text(this.game.camera.x + 40, this.game.camera.y + 440, "Strength - "+this.player.str, { font: "18px Arial", fill: "#000", align: "center" }); menuTextAgi = this.game.add.text(this.game.camera.x + 40, this.game.camera.y + 465, "Agility - "+this.player.agi, { font: "18px Arial", fill: "#000", align: "center" }); menuTextExp = this.game.add.text(this.game.camera.x + 40, this.game.camera.y + 140, "Experience \n"+this.player.exp+' / '+this.lvl1Exp, { font: "18px Arial", fill: "#000", align: "center" }); menuTextAttack = this.game.add.text(this.game.camera.x + 185, this.game.camera.y + 225, "Attack \n"+this.playerDmg, { font: "18px Arial", fill: "#000", align: "center" }); close.scale.setTo(1.1); playerMenu.scale.setTo(1.2); }, characterMenuClose: function () { playerMenu.kill(); close.kill(); menuTextWeapon.kill(); menuTextStr.kill(); menuTextAgi.kill(); menuTextExp.kill(); menuTextAttack.kill(); this.menuOn = false; }, Link to comment Share on other sites More sharing options...
WombatTurkey Posted October 26, 2015 Share Posted October 26, 2015 Honestly, you can do this through Phaser and Canvas in general using bitMapData (create own GUI's, etc), but I recommend you do the UI through the DOM. That positions itself over the canvas ~ chongdashu 1 Link to comment Share on other sites More sharing options...
Recommended Posts