SettingController.ts 736 字节
Newer Older
tomaszheng's avatar
init  
tomaszheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
import {ya} from "../../framework/ya";
import {EventConfig} from "../../config/EventConfig";
import ResourceConfig from "../../config/resource/ResourceConfig";

class SettingController extends ya.Controller {
    protected initGlobalListener() {
        super.initGlobalListener();

        this.addGlobalListener(EventConfig.EVT_SHOW_PAUSE, this.onShowPause, this);
    }

    onShowPause (data: any) {
        const prefabPath = 'resources/prefab/dialog_pause';
        ya.resourceManager.load(prefabPath, cc.Prefab).then(()=> {
            ya.dialogManager.show(prefabPath, data, {
                showType: ya.DialogShowTypes.SCALE,
                dataLoaded: true,
            });
        });
    }
}

export {SettingController};