Update: CC - Before Render - Moorcow (a2ow5l92js.js) 90 bytes modified
parent
3a270ecae1
commit
27f137360f
|
@ -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.explode = function(mesh) {
|
||||||
|
|
||||||
this.enemies.map(
|
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.totalTime += data.delta;
|
||||||
this.enemySpawnTime += data.delta;
|
this.enemySpawnTime += data.delta;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue