提交完美的无头模式

This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-22 17:46:08 +08:00
parent 7389f6d716
commit f890be0728
17 changed files with 975 additions and 175 deletions

View File

@@ -22,6 +22,12 @@ export interface GBattleModeInfo{
root:Node, //世界场景Root
}
//事件
export enum GBattleModeEvent{
//关闭模式
Close = "GBattleModeEvent_Close",
}
//全局战斗模式管理器
export default class GBattleModeManager extends Singleton {
@@ -93,13 +99,16 @@ export default class GBattleModeManager extends Singleton {
}
//关闭当前模式
async Close(){
async Close(data?:any){
//主动调用场景销毁
app.sync.onReset();
let current = this.current;
this.current = null;
this.frameNoSwitch = true;
//结束通知
app.event.emit(GBattleModeEvent.Close,current,data);
}
//设置自动推帧 ( 帧不由addFrame控制 管理器自动推帧)
@@ -109,8 +118,6 @@ export default class GBattleModeManager extends Singleton {
this.autoTime = 0;
}
//设置自动追帧
//清除当前模式
private clear(){
if(!this.isInit) return;