Add glowing golden ambient particle system to home page
This commit is contained in:
@@ -100,6 +100,7 @@ class SafetyGame {
|
||||
init() {
|
||||
this.avatar = new WorkerAvatar('avatar-container');
|
||||
this.particles = new ParticleEngine('stage-fx-canvas');
|
||||
this.homeParticles = new GoldenParticleEngine('home-golden-particles');
|
||||
|
||||
this.bindEvents();
|
||||
this.updateHUD();
|
||||
@@ -376,6 +377,9 @@ class SafetyGame {
|
||||
if (screenName === 'start') {
|
||||
this.stopTimer();
|
||||
this.dom.screenStart.classList.add('active');
|
||||
if (this.homeParticles) this.homeParticles.start();
|
||||
} else {
|
||||
if (this.homeParticles) this.homeParticles.stop();
|
||||
}
|
||||
if (screenName === 'game') this.dom.screenGame.classList.add('active');
|
||||
if (screenName === 'summary') {
|
||||
|
||||
Reference in New Issue
Block a user