Commit 281db12d authored by wildfirecode's avatar wildfirecode

1

parent b38f3c58
import Panel from "../../libs/new_wx/components/Panel";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
export default class QuitPanel extends Panel {
_level;
start(data) {
super.start();
if (data)
this._level = data.level;
this['resumeBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if (this._level)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}, this);
this['quitBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(18));
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}, this);
this.showlog();
......@@ -16,5 +29,8 @@ export default class QuitPanel extends Panel {
NetManager.ins.showLog(getlogItem(18));
}
// quitBtn
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['quitBtn'], this['resumeBtn']] }
get skinKey() { return 'Quit' }
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment