import Scene from "../views/Scene";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";

export default class OverPageScene extends Scene {


    public get skinKey() { return 'OverPageScene' }
    // public get groupName() { return 'overpage_scene' }

    constructor(data?) {
        super(data);
    }

    initEvents() {
        super.initEvents();
    }

    removeEvents() {
        super.removeEvents();

    }

    protected onSkinComplete(): void {
        super.onSkinComplete();

        this.once(egret.Event.ADDED_TO_STAGE, this.onLoad, this);
        if (this.stage) {
            this.onLoad();
        }
    }

    private bgtexture: egret.Texture;
    protected async preLoadRes() {
        //加载背景并设置背景图片
        // this.bgtexture = await RES.getResAsync('gameBg_jpg');
        // console.log('载背景并设置背景图片mainscene');


        // var mcJson = await RES.getResAsync('lightGameEff_json');
        // var mcImg = await RES.getResAsync('lightGameEff_png');
        // var mcFactory = new egret.MovieClipDataFactory(mcJson, mcImg);

        return new Promise(function (resolve, reject) {
            resolve();
        });
    }

    start(data?) {
        super.start(data);
        this.percentHeight = 100;
    }

    private onLoad(): void {
        this.initUI();
    }


    private initUI():void{
    }

}