2048小游戏,h5,纯前端

avatar
作者
筋斗云
阅读量:2

部分代码

    //score     var scoreSprite = game.add.sprite(10, 10);     var scoreGraphics = game.add.graphics(0, 0);     scoreGraphics.lineStyle(5, 0xA1C5C5);     scoreGraphics.beginFill(0x308C8C);     scoreGraphics.drawRoundedRect(0, 0, 70, 50, 10);     scoreGraphics.endFill();     scoreSprite.addChild(scoreGraphics);     var scoreTitle = game.add.text(0, 5, "SCORE", titleStyle);     scoreTitle.setTextBounds(0, 0, 70, 50);     scoreSprite.addChild(scoreTitle);     this.scoreText = game.add.text(0, 20, this.score, scoreStyle);     this.scoreText.setTextBounds(0, 0, 70, 50);     scoreSprite.addChild(this.scoreText);     //best     var bestSprite = game.add.sprite(90, 10);     var bestGraphics = game.add.graphics(0, 0);     bestGraphics.lineStyle(5, 0xA1C5C5);     bestGraphics.beginFill(0x308C8C);     bestGraphics.drawRoundedRect(0, 0, 70, 50, 10);     bestGraphics.endFill();

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!