import { ui } from "../ui/layaMaxUI";
import { DispatcherManager } from "../GameLogic/DispatcherManager";


export default class InGameView extends ui.InGameViewUI implements UI_Interface {
    private static instance: InGameView;
    static get Instance() {
        return InGameView.instance;
    }
    constructor() {
        super();
        InGameView.instance = this;
        this.resizeHander();
        DispatcherManager.on(Laya.Event.RESIZE, this, this.resizeHander);
    }
    OnShow(data?: any) {
   
        this.InitDate();
        this.InitHandler();
        this.InitUi();
     
    }
    resizeHander() {
        this.height = Laya.stage.height;
    }


    InitDate() {
   
    }

    InitHandler() {
      
    }
 
    InitUi() {
      
    }

 

    OnClose() {
        DispatcherManager.off(Laya.Event.RESIZE, this, this.resizeHander);
        InGameView.instance = null;
        Laya.timer.clearAll(this);

    }
}