event strings - 7yl4r/the-oregon-trajectory GitHub Wiki
angular's $broadcast/$emit/$on are used to communicate across modules, but there isn't a great way to list out all the event strings in code so this page is used to document event string constants and their function. This list may not be fully up-to-date, but it's better than nothing.
*** remember: event strings are case-sensitive and must match exactly, so watch out for typos ***
switchToModule
used to tell the module handler to switch from current module to another.
params:
str moduleName : name of the module to switch to
sent from:
- asteroid-mining
- travel-screen
- main-menu
caught by:
- the-oregon-trajectory.game
changeMusicTo
used to change background music from within a module
params:
newMusic: Howler.js sound object to be set as new background music.
sent from:
- asteroid-mining
- main-menu
caught by:
- the-oregon-trajectory.game
unMute
global un-mute volume.
sent from:
- audio-controls
caught by:
- asteroid-mining
Mute
global volume mute.
sent from:
- audio-controls
caught by:
- asteroid-mining