@flashist/appframework 0.0.234 → 0.0.235

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashist/appframework",
3
- "version": "0.0.234",
3
+ "version": "0.0.235",
4
4
  "scripts": {
5
5
  "build": "gulp",
6
6
  "publish:patch": "npm version patch && npm run build && cd ./dist && npm publish",
@@ -1,7 +1,8 @@
1
- import { getInstance, serviceLocatorAdd, SoundsManager } from "@flashist/flibs";
1
+ import { getInstance, serviceLocatorAdd, SoundsManager, SoundsManagerEvent } from "@flashist/flibs";
2
2
  import { BaseAppModule } from "../base/modules/BaseAppModule";
3
3
  import { BackgroundMusicManager } from "./managers/BackgroundMusicManager";
4
4
  import { SoundsStorageManager } from "./managers/SoundsStorageManager";
5
+ import { GlobalEventDispatcher } from "../globaleventdispatcher";
5
6
  export class SoundsModule extends BaseAppModule {
6
7
  init() {
7
8
  super.init();
@@ -14,6 +15,16 @@ export class SoundsModule extends BaseAppModule {
14
15
  super.activateCompleteHook();
15
16
  const soundsStorageModule = getInstance(SoundsStorageManager);
16
17
  soundsStorageModule.activateCompleteHook();
18
+ // Redispatch all events from the SoundsManager to the global dispatcher
19
+ const globalDispatcher = getInstance(GlobalEventDispatcher);
20
+ const soundsManager = getInstance(SoundsManager);
21
+ const allEventKeys = Object.keys(SoundsManagerEvent);
22
+ for (let singleEventKey of allEventKeys) {
23
+ const singleEventValue = SoundsManagerEvent[singleEventKey];
24
+ this.eventListenerHelper.addEventListener(soundsManager, singleEventValue, (...args) => {
25
+ globalDispatcher.dispatchEvent(singleEventValue, ...args);
26
+ });
27
+ }
17
28
  }
18
29
  }
19
30
  //# sourceMappingURL=SoundsModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SoundsModule.js","sourceRoot":"","sources":["../../src/sounds/SoundsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE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