///
/// Base class for a high-level game mode (state) handled by
/// . A mode configures the relevant scene systems
/// when it becomes active (), can clean up when it is left
/// () and may run per-frame logic in .
///
/// Modes are plain C# classes (not MonoBehaviours). To add a new mode, derive
/// from this class and register an instance in GameModeManager.BuildModes().
///
public abstract class GameMode
{
/// The owning manager, providing access to the controlled systems.
protected GameModeManager Manager { get; private set; }
/// Human-readable name (shown in logs / debug UI).
public abstract string DisplayName { get; }
/// Wires the mode to its manager. Called once during registration.
internal void Bind(GameModeManager manager) => Manager = manager;
/// Called once when this mode becomes the active mode.
public virtual void Enter() { }
/// Called once when this mode stops being the active mode.
public virtual void Exit() { }
/// Called every frame while this mode is the active mode.
public virtual void Tick() { }
}