diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index 13bf168..c39cfc8 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -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;