- 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.
25 lines
902 B
C#
25 lines
902 B
C#
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);
|
||
}
|
||
}
|