import { GUIManager } from "../../../engines/gui/GUIManager";
import GUIMediator from "../../../engines/gui/GUIMediator";
import LoadingView from "../../../engines/loadingView/LoadingView";
import SceneManager from "../../../engines/scenes/SceneManager";
import UI_Hall from "../../../ui/Hall/UI_Hall";
import LayerKeys from "../../LayerKeys";
import GameModel from "../../models/GameModel";
import UIKeys from "../../UIKeys";




export default class HallMediator extends GUIMediator
{

    protected OnShow():void{
        // GUIManager.single.Show(UIKeys.WXS01);
        this.view.m_levelLabel.text="第"+GameModel.single.currentLevel+"关";
    }

    protected OnHide():void{
        
    }

    protected AddEvents():void{
        this.view.m_Start.onClick(this.StartButtonClick,this);
        this.view.m_btnMore.onClick(this.MoreButtonClick,this);
    }

    protected RemoveEvents():void{
        this.view.m_Start.offClick(this.StartButtonClick,this);
        this.view.m_btnMore.offClick(this.MoreButtonClick,this);
    }

    private MoreButtonClick():void{
        GUIManager.single.Show(UIKeys.WXS01);
    }

    private StartButtonClick():void{
        GUIManager.single.Show(UIKeys.EGG);
        this.HideSelf();
    }

    get view():UI_Hall{
        return this._view as UI_Hall;
    }
}