mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Fullscreen effects are rendered behind the terrain now
This commit is contained in:
13
js/Game.js
13
js/Game.js
@@ -68,16 +68,17 @@ export class Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.context.clearRect(0, 0, window.innerWidth, window.innerHeight);
|
this.context.clearRect(0, 0, window.innerWidth, window.innerHeight);
|
||||||
|
|
||||||
|
for (const effect of this.level.fullscreenEffects) {
|
||||||
|
effect.update(timestamp);
|
||||||
|
effect.render(this.context, this.camera);
|
||||||
|
}
|
||||||
|
|
||||||
this.architecture.draw(this.context, this.camera);
|
this.architecture.draw(this.context, this.camera);
|
||||||
this.gisela.draw(this.context, this.camera);
|
this.gisela.draw(this.context, this.camera);
|
||||||
this.mrCroc.draw(this.context, this.camera);
|
this.mrCroc.draw(this.context, this.camera);
|
||||||
|
|
||||||
for (const effect of this.level.fullscreenEffects) {
|
this.userInterface.draw(this.context);
|
||||||
effect.update(timestamp);
|
|
||||||
effect.render(this.context, this.camera);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.userInterface.draw(this.context);
|
|
||||||
|
|
||||||
this.lastRendered = timestamp;
|
this.lastRendered = timestamp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user