mirror of
https://github.com/wyb10a10/cocos_creator_framework.git
synced 2026-06-06 17:19:59 +08:00
大厅界面,完善quick close
This commit is contained in:
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user