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:
24
Assets/_Game/Scripts/World/SpawnContext.cs
Normal file
24
Assets/_Game/Scripts/World/SpawnContext.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace BaseGames.World
|
||||
{
|
||||
/// <summary>
|
||||
/// 玩家在房间激活时的出生上下文。
|
||||
/// 由 <see cref="Streaming.RoomHandle"/> 传递给 <see cref="RoomController"/>,
|
||||
/// 用于确定出生点位置和方向。
|
||||
/// </summary>
|
||||
public readonly struct SpawnContext
|
||||
{
|
||||
/// <summary>目标出生点 ID,对应 <see cref="PlayerSpawnPoint.TransitionId"/>。null 时使用默认出生点。</summary>
|
||||
public readonly string EntryTransitionId;
|
||||
|
||||
/// <summary>true = 死亡复活流程,不播放入场动画。</summary>
|
||||
public readonly bool IsRespawn;
|
||||
|
||||
public SpawnContext(string entryTransitionId, bool isRespawn = false)
|
||||
{
|
||||
EntryTransitionId = entryTransitionId;
|
||||
IsRespawn = isRespawn;
|
||||
}
|
||||
|
||||
public static readonly SpawnContext Default = new SpawnContext(null, false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user