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:
38
Assets/_Game/Scripts/Enemies/StatusEffects/IStatusEffect.cs
Normal file
38
Assets/_Game/Scripts/Enemies/StatusEffects/IStatusEffect.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BaseGames.Enemies.StatusEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态效果类型枚举。
|
||||
/// </summary>
|
||||
public enum StatusEffectType
|
||||
{
|
||||
Frozen, // 冻结:停止移动、降低 BT Tick 频率
|
||||
Sleep, // 睡眠:受击即唤醒
|
||||
Burning, // 灼烧:持续扣血
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 状态效果接口。
|
||||
/// 每种效果实现此接口,由 <see cref="EnemyStatusEffectManager"/> 统一管理生命周期。
|
||||
/// </summary>
|
||||
public interface IStatusEffect
|
||||
{
|
||||
StatusEffectType Type { get; }
|
||||
|
||||
/// <summary>持续时间(秒),负值 = 永久(直到手动移除)。</summary>
|
||||
float Duration { get; }
|
||||
|
||||
/// <summary>效果是否已自然结束(超时或条件不满足)。</summary>
|
||||
bool IsFinished { get; }
|
||||
|
||||
/// <summary>效果挂载到 enemy 时调用一次。</summary>
|
||||
void OnApplied(EnemyBase enemy);
|
||||
|
||||
/// <summary>效果每帧 Tick(由 EnemyStatusEffectManager 驱动)。</summary>
|
||||
void Tick(EnemyBase enemy, float deltaTime);
|
||||
|
||||
/// <summary>效果移除(超时 / 手动 / 死亡)时调用一次。</summary>
|
||||
void OnRemoved(EnemyBase enemy);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user