Files
Emberwild/Assets/GAME/Script/Network/GameSession.cs
T
2026-06-22 16:18:34 +02:00

44 lines
1.2 KiB
C#

namespace Ashwild.Network
{
/// <summary>
/// Carries the player's menu choice (save slot, host vs. join, join code) across the
/// MenuScene → GameScene transition. Plain static state so it survives the scene load
/// without needing a DontDestroyOnLoad object of its own.
/// </summary>
public static class GameSession
{
#region Types
/// <summary>
/// How the upcoming game scene should be launched on the network.
/// </summary>
public enum LaunchMode
{
Host,
Join
}
#endregion
#region State
/// <summary>
/// Whether the next launch hosts a new session or joins an existing one.
/// </summary>
public static LaunchMode Mode { get; set; } = LaunchMode.Host;
/// <summary>
/// The save slot picked in the menu (-1 when none). Reserved for the future SaveManager.
/// </summary>
public static int SelectedSlot { get; set; } = -1;
/// <summary>
/// The session code to connect to when <see cref="Mode"/> is Join (host SteamID64).
/// </summary>
public static string JoinCode { get; set; } = string.Empty;
#endregion
}
}