From f57d42476d90a1c1cf5edfb62e3248b6967c2e6c Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 25 Nov 2017 15:22:18 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (a2ow5l92js.js) 97 bytes modified --- a2ow5l92js.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/a2ow5l92js.js b/a2ow5l92js.js index af462cf..908a53a 100644 --- a/a2ow5l92js.js +++ b/a2ow5l92js.js @@ -49,6 +49,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.leftLight = this.entityLoaded.leftLight; this.rightLight = this.entityLoaded.rightLight; this.scoreCanvas = this.entityLoaded.scoreCanvas; + this.scoreTexture = this.entityLoaded.scoreTexture; this.throwerLight = this.entityLoaded.throwerLight; this.fireParticleEngine = this.entityLoaded.fireParticleEngine; this.smokeParticleEngine = this.entityLoaded.smokeParticleEngine; @@ -663,7 +664,7 @@ this.drawScore = function() { context.textBaseline = "middle"; - context.clearRect(0,0,this.canvas.width, this.canvas.height); + context.clearRect(0,0,this.scoreCanvas.width, this.scoreCanvas.height); /** * Write text @@ -672,7 +673,9 @@ this.drawScore = function() { context.font = '20pt BkBold'; context.fillText('10', 23, 52); -} +}.bind(this) + + this.totalTime += data.delta; this.enemySpawnTime += data.delta; @@ -697,6 +700,8 @@ this.scene.meshes.map( if (this.mouseIsDown) { + this.drawScore(); + this.kanisterTime += data.delta; this.renderer.clearColor.r += 0.01;