Skip to content

Commit b53b858

Browse files
committed
Removed extra calls and corrected naming errors
1 parent 61899ca commit b53b858

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

src/game.js

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,26 @@ export class Game
4040
// in a full game this should be handled gracefully.
4141
PIXI.loader.resources['bounce'].sound.volume = value;
4242
});
43-
testApp.state.musicVolume.subscribe(result =>
43+
44+
this.app.state.musicVolume.subscribe(result =>
4445
{
4546
console.log('musicVolume: ', result);
4647
});
47-
testApp.state.voVolume.subscribe(result =>
48+
49+
this.app.state.voVolume.subscribe(result =>
4850
{
4951
console.log('voVolume: ', result);
5052
});
53+
54+
this.app.state.captionsMuted.subscribe(result =>
55+
{
56+
console.log('captionsMuted: ', result);
57+
});
5158

5259
// add a extra state property for storying the current scene. Whenever the scene is changed, this class
5360
// will swap out the container attached to the stage
5461
this.app.state.scene = new Property(null);
55-
this.app.state.scene.subscribe(this.onChangeScene.bind(this));
56-
57-
this.application.state.musicVolume.subscribe(result =>
58-
{
59-
console.log('musicVolume: ', result);
60-
});
61-
this.application.state.voVolume.subscribe(result =>
62-
{
63-
console.log('voVolume: ', result);
64-
});
65-
this.application.state.captionsMuted.subscribe(result =>
66-
{
67-
console.log('captionsMuted: ', result);
68-
});
62+
this.app.state.scene.subscribe(this.onChangeScene.bind(this));
6963

7064
// wait for the app to be ready, then set the new scene
7165
this.app.state.ready.subscribe(() =>

0 commit comments

Comments
 (0)