- 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.
46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
namespace BaseGames.Enemies
|
||
{
|
||
/// <summary>
|
||
/// 敌人 AI 行为阶段枚举(独立于 EnemyStateType 的物理/战斗状态)。
|
||
///
|
||
/// 两套状态正交关系:
|
||
/// - <see cref="EnemyStateType"/>:受击/击飞/死亡等物理事件驱动的瞬时状态。
|
||
/// - <see cref="AiPhase"/>:行为树主动切换的持续阶段,反映 AI 当前的战术意图。
|
||
///
|
||
/// 典型切换路径:
|
||
/// <code>
|
||
/// Idle / Patrol
|
||
/// → [感知触发] → Alert(短暂警觉动作)
|
||
/// → Chase(追击)
|
||
/// → Combat(攻击范围内)
|
||
/// ↓ 丢失视线超时
|
||
/// → Investigate(前往最后可见位置搜查)
|
||
/// ↓ 搜查完成或超出范围
|
||
/// → ReturnHome(归位)→ Patrol
|
||
/// </code>
|
||
/// </summary>
|
||
public enum AiPhase
|
||
{
|
||
/// <summary>未激活,静止或播放待机循环动画。</summary>
|
||
Idle,
|
||
|
||
/// <summary>沿路点或随机目的地正常巡逻,无感知威胁。</summary>
|
||
Patrol,
|
||
|
||
/// <summary>感知到威胁后的短暂警觉过渡阶段,通常播放抬头/发现动作后进入 Chase。</summary>
|
||
Alert,
|
||
|
||
/// <summary>全力追击玩家,使用奔跑速度。</summary>
|
||
Chase,
|
||
|
||
/// <summary>玩家在攻击距离内,准备或正在执行攻击。</summary>
|
||
Combat,
|
||
|
||
/// <summary>丢失目标后前往最后可见坐标搜查,若无发现则切 ReturnHome 或 Patrol。</summary>
|
||
Investigate,
|
||
|
||
/// <summary>超出追击范围或搜查结束后归位到初始位置。</summary>
|
||
ReturnHome,
|
||
}
|
||
}
|