mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-12-08 22:09:03 +00:00
提交上阵
This commit is contained in:
@@ -6,6 +6,7 @@ import { Node } from "cc";
|
||||
import { instantiate } from "cc";
|
||||
import { app } from "../App";
|
||||
import { JNFrameInfo, JNSyncFrameEvent } from "../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
|
||||
import { CCObject } from "cc";
|
||||
|
||||
export enum BattleMode{
|
||||
//无尽模式
|
||||
@@ -60,8 +61,6 @@ export default class GBattleModeManager extends Singleton {
|
||||
//打开指定模式
|
||||
async Open(mode:BattleMode,isAuto:boolean = false){
|
||||
|
||||
await this.Close();
|
||||
|
||||
this.current = mode;
|
||||
this.setAuto(isAuto);
|
||||
|
||||
@@ -75,7 +74,6 @@ export default class GBattleModeManager extends Singleton {
|
||||
|
||||
//主动调用场景销毁
|
||||
app.sync.onReset();
|
||||
this.clear();
|
||||
this.current = null;
|
||||
|
||||
}
|
||||
@@ -94,6 +92,7 @@ export default class GBattleModeManager extends Singleton {
|
||||
|
||||
//创建当前模式
|
||||
private create(){
|
||||
|
||||
if(!this.isInit || this.current == null) return;
|
||||
let mode = instantiate(this.modes[this.current]);
|
||||
mode.getComponent(GBaseMode).camera = this.camera;
|
||||
|
||||
Reference in New Issue
Block a user