From 27f137360f71f1e557ea19c7340367f876d59421 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 25 Nov 2017 15:39:17 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (a2ow5l92js.js) 90 bytes modified --- a2ow5l92js.js | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/a2ow5l92js.js b/a2ow5l92js.js index 908a53a..fb3364d 100644 --- a/a2ow5l92js.js +++ b/a2ow5l92js.js @@ -437,6 +437,26 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { }; + this.drawScore = function(score) { + + var context = this.scoreCanvas.instance.getContext('2d'); + + context.textBaseline = "middle"; + + context.clearRect(0,0,this.scoreCanvas.width, this.scoreCanvas.height); + + /** + * Write text + */ + context.fillStyle = '#7e3b26'; + context.font = '230pt BkBold'; + context.fillText(score, 0, this.scoreCanvas.height/2); + + this.scoreTexture.instance.needsUpdate = true; + + }.bind(this) + + this.explode = function(mesh) { this.enemies.map( @@ -658,25 +678,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { ); } -this.drawScore = function() { - - var context = this.scoreCanvas.instance.getContext('2d'); - - context.textBaseline = "middle"; - - context.clearRect(0,0,this.scoreCanvas.width, this.scoreCanvas.height); - - /** - * Write text - */ - context.fillStyle = '#7e3b26'; - context.font = '20pt BkBold'; - context.fillText('10', 23, 52); - -}.bind(this) - - - this.totalTime += data.delta; this.enemySpawnTime += data.delta;