mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-12-08 22:09:03 +00:00
提交完美的无头模式
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user