feat: Implement Room Streaming System

- Add RoomStreamingManager to manage room loading and unloading based on player proximity.
- Create StreamingBudgetConfigSO for memory and performance budgeting of the streaming system.
- Introduce TransitionDirector to handle seamless and atmospheric fade transitions between rooms.
- Develop WorldGraph to represent room connectivity and facilitate neighbor queries and distance calculations.
- Implement RoomNode and RoomEdge classes to structure room data and connections.
This commit is contained in:
2026-05-23 19:10:29 +08:00
parent 81c326af53
commit a1b4e629aa
165 changed files with 7904 additions and 313 deletions

View File

@@ -0,0 +1,36 @@
#if GRAPH_DESIGNER
using UnityEngine;
using Opsive.BehaviorDesigner.Runtime.Tasks;
using Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals;
using BaseGames.Enemies;
namespace BaseGames.Enemies.AI
{
/// <summary>
/// BD Conditional当前 AI 行为阶段是否与目标匹配。
///
/// 常用于 Decorator Conditional Abort 或 Sequence 头部保护子树,
/// 例如只有在 <see cref="AiPhase.Patrol"/> 阶段时才执行巡逻序列。
/// </summary>
[TaskName("Is Ai Phase?")]
[TaskCategory("BaseGames/Enemy/State")]
[TaskDescription("检查当前 AI 行为阶段是否与目标枚举值匹配")]
public sealed class BD_IsAiPhase : Conditional
{
[Tooltip("目标 AI 行为阶段")]
[SerializeField] private AiPhase m_Phase = AiPhase.Patrol;
private EnemyBase _enemy;
public override void OnAwake() => _enemy = gameObject.GetComponent<EnemyBase>();
public override TaskStatus OnUpdate()
{
if (_enemy == null) return TaskStatus.Failure;
return _enemy.CurrentAiPhase == m_Phase
? TaskStatus.Success
: TaskStatus.Failure;
}
}
}
#endif