mirror of
https://github.com/wyb10a10/cocos_creator_framework.git
synced 2026-06-20 19:46:07 +08:00
25 lines
530 B
TypeScript
25 lines
530 B
TypeScript
import { UIView } from "../../ui/UIView";
|
|
import { uiManager } from "../../ui/UIManager";
|
|
import { UIID } from "../UIExample";
|
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class UIHall extends UIView {
|
|
|
|
@property({type : cc.Sprite})
|
|
weapon: cc.Sprite = null;
|
|
|
|
public onBag() {
|
|
uiManager.open(UIID.UIBag);
|
|
}
|
|
|
|
public onNotice() {
|
|
uiManager.open(UIID.UINotice);
|
|
}
|
|
|
|
public onTop(preID: number, item: cc.SpriteFrame) {
|
|
this.weapon.spriteFrame = item;
|
|
}
|
|
}
|