大厅界面,完善quick close

This commit is contained in:
宝爷
2019-11-13 23:19:53 +08:00
committed by wyb10a10
parent 8b066b6713
commit ab9f027b8f
7 changed files with 226 additions and 89 deletions

View File

@@ -1,31 +1,21 @@
// Learn TypeScript:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
// - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
import { UIView } from "../../ui/UIView";
import { uiManager } from "../../ui/UIManager";
import { UIID } from "../UIExample";
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
export default class UIHall extends UIView {
public onBag() {
uiManager.open(UIID.UIBag);
}
// update (dt) {}
public onNotice() {
uiManager.open(UIID.UINotice);
}
public onTop(preID: number, item: number) {
}
}

View File

@@ -8,6 +8,8 @@ const {ccclass, property} = cc._decorator;
export default class UILogin extends UIView {
public onLogin() {
uiManager.replace(UIID.UIHall);
// 连续打开2个界面
uiManager.open(UIID.UIHall);
uiManager.open(UIID.UINotice);
}
}