12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import BaseMediator from "../lightMVC/core/base/BaseMediator";
- import Notification from "./Notification";
- import { ViewManager } from "../lightMVC/core/manager/ViewManager";
- import hallScene from "./hallScene";
- export default class hallSceneMediator extends BaseMediator {
- public view: hallScene;
- public init(data?: any): void {
- //将mediator添加到了layer数组中
- ViewManager.getInstance().pushLayerList(this);
- this.registerNoti("UPDATE_TILI", () => {
- console.log('UPDATE_TILI**************')
- this.view.ShowPhysicalValue();
- }, this);
- this.registerNoti("UPDATE_COIN", () => {
- console.log('UPDATE_TILI**************')
- this.view.ShowUserCoinValue();
- }, this);
- this.registerNoti("UPDATE_DIAMOND", () => {
- console.log('UPDATE_DIAMOND**************')
- this.view.ShowUserDiamondValue();
- }, this);
- this.registerNoti("UPDATE_TILI_JISHI", (data) => {
- this.view.TiliCountShow(data);
- }, this);
- }
- public viewDidAppear(): void {
- }
- public destroy(): void {
- }
- }
|