init
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { _decorator, Button, Component, EventTouch, Input, input, instantiate, Node, Prefab } from 'cc';
|
||||
import { PanelBase } from '../framework/ui/PanelBase';
|
||||
import { FPSCameraController } from '../FPSCameraController';
|
||||
import { GameController } from '../GameController';
|
||||
import { TargetIconItem } from './TargetIconItem';
|
||||
import { EventCenter } from '../EventCenter';
|
||||
import { UIManager } from '../framework/ui/UIManager';
|
||||
import { AudioMgr } from '../framework/audio/AudioMgr';
|
||||
import { AssetController } from '../AssetController';
|
||||
import { PlayPanel } from './PlayPanel';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('QingBaoPanel')
|
||||
export class QingBaoPanel extends PanelBase {
|
||||
|
||||
static instance: QingBaoPanel = null
|
||||
|
||||
@property(Button)
|
||||
closeBtn: Button = null;
|
||||
|
||||
onLoad() {
|
||||
QingBaoPanel.instance = this
|
||||
this.closeBtn.node.on(Button.EventType.CLICK, this.onClickClose, this);
|
||||
}
|
||||
onClickClose() {
|
||||
AudioMgr.inst.playOneShot(AssetController.instance.click)
|
||||
UIManager.instance.closePanel(QingBaoPanel)
|
||||
}
|
||||
|
||||
protected onOpen(): void {
|
||||
FPSCameraController.getInstance().showQingBao()
|
||||
}
|
||||
|
||||
protected onClose(): void {
|
||||
FPSCameraController.getInstance().closeQingBao()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user