添加 CombatNodeComponent 及相关类
- CombatNodeComponent:节点组件,负责提取并开始关卡 - CombatScheduler:关卡调度器,负责关卡的生命周期调度 - MapEntity:地图实体,提供地图相关的数据 - Spawner:出生点,负责标记地图上的敌人出生点坐标 - House:基地,负责标记地图上的敌人目标点坐标
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using GameFramework.Fsm;
|
||||
using GameFramework.Procedure;
|
||||
using GeometryTD.Definition;
|
||||
using GeometryTD.UI;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace GeometryTD.Procedure
|
||||
@@ -10,8 +9,6 @@ namespace GeometryTD.Procedure
|
||||
{
|
||||
public override bool UseNativeDialog => false;
|
||||
|
||||
private RepoFormUseCase _repoFormUseCase;
|
||||
|
||||
public bool GameStart { get; set; }
|
||||
|
||||
#region FSM
|
||||
@@ -28,12 +25,13 @@ namespace GeometryTD.Procedure
|
||||
GameStart = false;
|
||||
GameEntry.EventNode.OnInit();
|
||||
GameEntry.CombatNode.OnInit(LevelThemeType.Plain);
|
||||
GameEntry.CombatNode.StartCombat();
|
||||
|
||||
//GameEntry.EventNode.StartEvent();
|
||||
|
||||
_repoFormUseCase = new RepoFormUseCase();
|
||||
GameEntry.UIRouter.BindUIUseCase(UIFormType.RepoForm, _repoFormUseCase);
|
||||
GameEntry.UIRouter.OpenUI(UIFormType.RepoForm);
|
||||
// _repoFormUseCase = new RepoFormUseCase();
|
||||
// GameEntry.UIRouter.BindUIUseCase(UIFormType.RepoForm, _repoFormUseCase);
|
||||
// GameEntry.UIRouter.OpenUI(UIFormType.RepoForm);
|
||||
}
|
||||
|
||||
protected override void OnUpdate(IFsm<IProcedureManager> procedureOwner, float elapseSeconds,
|
||||
@@ -45,14 +43,18 @@ namespace GeometryTD.Procedure
|
||||
{
|
||||
procedureOwner.SetData<VarInt32>("NextSceneId", (int)SceneType.Main);
|
||||
ChangeState<ProcedureChangeScene>(procedureOwner);
|
||||
return;
|
||||
}
|
||||
|
||||
GameEntry.CombatNode.OnUpdate(elapseSeconds, realElapseSeconds);
|
||||
}
|
||||
|
||||
protected override void OnLeave(IFsm<IProcedureManager> procedureOwner, bool isShutdown)
|
||||
{
|
||||
GameEntry.CombatNode.OnShutdown();
|
||||
base.OnLeave(procedureOwner, isShutdown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
using GameFramework.Resource;
|
||||
using System.Collections.Generic;
|
||||
using GeometryTD;
|
||||
using GeometryTD.CustomUtility;
|
||||
using GeometryTD.DataTable;
|
||||
using GeometryTD.Definition;
|
||||
@@ -43,7 +35,7 @@ namespace GeometryTD.Procedure
|
||||
"UISound",
|
||||
};
|
||||
|
||||
private Dictionary<string, bool> _loadedFlag = new Dictionary<string, bool>();
|
||||
private readonly Dictionary<string, bool> _loadedFlag = new();
|
||||
|
||||
public override bool UseNativeDialog => true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user