Search the Community
Showing results for tags 'gameover'.
-
Hi, i'm creating a gameover screen and i made it .. now i want color faded or like an overlay screen around gameover screen group. this is the code snippet i'm using ... this.gameOverScreenGroup = this.game.add.group(); this.gameOverScreenGroup.x = 197; this.gameOverScreenGroup.y = 52; /* var gameOverBGScreen = this.game.add.bitmapData(this.game.width,this.game.height); gameOverBGScreen.ctx.fillStyle = "#d5d2cc" gameOverBGScreen.ctx.fillRect(0,0,this.game.width,this.game.height) */ /* Game Over screen BG */ this.gameOverBG = this.game.add.graphics(0,0,this.gameOverScreenGroup); // this.gameOverBG.lineStyle(2, 0xFFFF00, 1.0); this.gameOverBG.drawRoundedRect(0,0,630,600,10); this.gameOverBG.beginFill(0xfaecbe, 1); this.gameOverBG.drawRoundedRect(0,0,630,600,10); this.gameOverBG.endFill(); this.gameOverBG.width = 630; this.gameOverBG.height = 600; // this.gameOverScreenGroup.add(gameOverBGScreen) this.gameOverScreenGroup.add(this.gameOverBG); //this.gameOverScreenGroup.x = this.gameOverBG.x; //this.gameOverScreenGroup.y = this.gameOverBG.y; var star_1 = this.game.add.sprite(60, 74,'UI', 'star',this.gameOverScreenGroup); var star_2 = this.game.add.sprite(star_1.width+110, 44,'UI', 'star',this.gameOverScreenGroup); var star_3 = this.game.add.sprite(star_2.width*2+160, 74,'UI', 'star',this.gameOverScreenGroup); this.nextBtn = this.game.add.sprite(209, 226,'UI', 'btn_next',this.gameOverScreenGroup); this.nextBtn.inputEnabled = false;