Update: CC - Before Render - Moorcow (a2ow5l92js.js) 311 bytes modified
parent
939d58b413
commit
a1d19fe434
|
@ -50,6 +50,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
this.rightLight = this.entityLoaded.rightLight;
|
this.rightLight = this.entityLoaded.rightLight;
|
||||||
this.scoreCanvas = this.entityLoaded.scoreCanvas;
|
this.scoreCanvas = this.entityLoaded.scoreCanvas;
|
||||||
this.scoreTexture = this.entityLoaded.scoreTexture;
|
this.scoreTexture = this.entityLoaded.scoreTexture;
|
||||||
|
this.scoreMesh = this.entityLoaded.scoreMesh;
|
||||||
this.throwerLight = this.entityLoaded.throwerLight;
|
this.throwerLight = this.entityLoaded.throwerLight;
|
||||||
this.fireParticleEngine = this.entityLoaded.fireParticleEngine;
|
this.fireParticleEngine = this.entityLoaded.fireParticleEngine;
|
||||||
this.smokeParticleEngine = this.entityLoaded.smokeParticleEngine;
|
this.smokeParticleEngine = this.entityLoaded.smokeParticleEngine;
|
||||||
|
@ -73,9 +74,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
this.running = false;
|
this.running = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* This component is initializing - set the total time to 0
|
|
||||||
*/
|
|
||||||
this.totalTime = 0;
|
this.totalTime = 0;
|
||||||
|
|
||||||
this.kanisters = 3;
|
this.kanisters = 3;
|
||||||
|
@ -84,8 +82,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
this.kanisterLeakTime = 0.1;
|
this.kanisterLeakTime = 0.1;
|
||||||
this.kanisterSpawnScore = 50;
|
this.kanisterSpawnScore = 50;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.setNextKanisterSpawnScore = function() {
|
this.setNextKanisterSpawnScore = function() {
|
||||||
|
|
||||||
this.kanisterSpawnScore = this.score + 100;
|
this.kanisterSpawnScore = this.score + 100;
|
||||||
|
@ -171,6 +167,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
this.enemies = [];
|
this.enemies = [];
|
||||||
|
|
||||||
|
this.scores = [];
|
||||||
|
|
||||||
this.enemiesSpawned = 0;
|
this.enemiesSpawned = 0;
|
||||||
|
|
||||||
this.fog.density = 0.01;
|
this.fog.density = 0.01;
|
||||||
|
@ -437,7 +435,17 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.drawScore = function(score) {
|
this.drawScore = function(enemy) {
|
||||||
|
|
||||||
|
/*var scoreMesh = this.scoreMesh.clone();
|
||||||
|
scoreMesh.position = enemy.mesh.position.clone();
|
||||||
|
|
||||||
|
var scoreTexture = this.scoreTexture.clone();
|
||||||
|
scoreMesh.materials[0].instance.map = scoreTexture.instance;
|
||||||
|
*/
|
||||||
|
|
||||||
|
this.scoreMesh.position = enemy.mesh.position.clone();
|
||||||
|
this.scoreMesh.updateInstance('position');
|
||||||
|
|
||||||
var context = this.scoreCanvas.instance.getContext('2d');
|
var context = this.scoreCanvas.instance.getContext('2d');
|
||||||
|
|
||||||
|
@ -450,7 +458,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
*/
|
*/
|
||||||
context.fillStyle = '#7e3b26';
|
context.fillStyle = '#7e3b26';
|
||||||
context.font = '230pt BkBold';
|
context.font = '230pt BkBold';
|
||||||
context.fillText(score, 0, this.scoreCanvas.height/2);
|
context.fillText(enemy.score, 0, this.scoreCanvas.height/2);
|
||||||
|
|
||||||
this.scoreTexture.instance.needsUpdate = true;
|
this.scoreTexture.instance.needsUpdate = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue