Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 395 bytes modified

beta.r3js.org
-=yb4f310 2017-11-14 08:12:07 +01:00
parent 7901982977
commit e1aec1ec91
1 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.burger = this.entityLoaded.burger;
this.parcel = this.entityLoaded.parcel;
this.santa = this.entityLoaded.santa;
this.renderer = this.entityLoaded.renderer;
this.bull.instance.visible = false;
this.star.instance.visible = false;
@ -162,6 +163,20 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.totalTime += data.delta;
this.spawnTime += data.delta;
if (this.mouseDown) {
this.renderer.clearColor.r += 0.01;
if (this.renderer.clearColor.r > 1) {
this.renderer.clearColor.r = 1;
}
this.renderer.updateInstance('clearColor');
} else {
this.renderer.clearColor.r -= 0.01;
if (this.renderer.clearColor.r < 0) {
this.renderer.clearColor.r = 0;
}
this.renderer.updateInstance('clearColor');
}
if (this.spawnTime > this.nextSpawnTime) {
this.nextSpawnTime = this.getNextSpawnTime();
this.spawnTime = 0;