Update: CC - Before Render - Moorcow (a2ow5l92js.js) 90 bytes modified

beta.r3js.org
-=yb4f310 2017-11-25 15:39:17 +01:00
parent 3a270ecae1
commit 27f137360f
1 changed files with 20 additions and 19 deletions

View File

@ -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;