Game.Stage
Assembly: Assembly-CSharp
Namespace: Game
Type: enum
Base: System.Enum
Summary: Represents the high-level application stages of the game. Use this enum to identify which major area of the application is active (no stage, main menu, in-game, or editor) and to branch logic or enable/disable systems based on the current stage.
Fields
-
None
Defines a default/undefined stage. Typically used as an initial or reset state. -
MainMenu
Indicates the main menu UI is active. Use this stage to enable menu-specific systems and disable game/editor systems. -
Game
Indicates the player is in the main game mode. Enable simulation, rendering, and game logic tied to active gameplay when this stage is set. -
Editor
Indicates an editor mode (e.g., map or asset editor) is active. Use this stage to enable editor tools and disable runtime-only systems.
Properties
- (none)
Enums do not expose instance properties. Use the enum values directly for comparisons and switches.
Constructors
- (none)
Enum types have an implicit underlying value and are constructed via assignment or casting; there are no explicit constructors defined here.
Methods
- (none)
No custom methods are defined on this enum. Standard System.Enum methods (e.g., ToString, HasFlag, GetValues) are available.
Usage Example
// Example: checking current stage and branching logic
Game.Stage currentStage = Game.Stage.None;
// Transition to main menu
currentStage = Game.Stage.MainMenu;
if (currentStage == Game.Stage.MainMenu)
{
// Initialize menu systems, disable simulation
}
// Switch to gameplay
currentStage = Game.Stage.Game;
switch (currentStage)
{
case Game.Stage.Game:
// Enable simulation and gameplay systems
break;
case Game.Stage.Editor:
// Enable editor tools
break;
case Game.Stage.MainMenu:
case Game.Stage.None:
default:
// Disable gameplay-specific systems
break;
}