Game.Tutorials.TutorialDeactivationSystem
Assembly: Assembly-CSharp.dll
Namespace: Game.Tutorials
Type: class
Base: GameSystemBase
Summary:
Manages and updates a collection of tutorial deactivation subsystems. On creation it obtains or creates several concrete TutorialDeactivationSystemBase-derived systems (control scheme, UI, object selection, infoview) and stores them in an internal list. The system is disabled by default and enabled when a game mode is active. During updates it iterates the child systems and invokes their Update methods, guarding each call with exception handling and logging.
Fields
private System.Collections.Generic.List<TutorialDeactivationSystemBase> m_Systems
Holds the child deactivation subsystems. Populated in OnCreate via World.GetOrCreateSystemManaged() calls for: - TutorialControlSchemeDeactivationSystem
- TutorialUIDeactivationSystem
- TutorialObjectSelectionDeactivationSystem
- TutorialInfoviewDeactivationSystem
Used in OnUpdate to iterate and run each subsystem's Update().
Properties
- This class exposes no public properties.
Constructors
public TutorialDeactivationSystem()
Parameterless constructor (marked with [Preserve] in the source). The constructor itself does not populate subsystems — initialization is performed in OnCreate.
Methods
-
protected override void OnCreate()
: System.Void
Creates or obtains the managed child deactivation systems and stores them in m_Systems. After registering the subsystems the system sets base.Enabled = false so it starts disabled by default. The method calls base.OnCreate() first. -
protected override void OnGamePreload(Purpose purpose, GameMode mode)
: System.Void
Called during game preload. Calls base.OnGamePreload(purpose, mode) and then sets base.Enabled = mode.IsGame(), enabling the system only when the current mode is a playable game mode. -
protected override void OnUpdate()
: System.Void
Iterates over each subsystem in m_Systems and calls system.Update(). Each call is wrapped in a try/catch to prevent a single subsystem exception from breaking the loop; caught exceptions are logged via COSystemBase.baseLog.Critical(exception).
Usage Example
[Preserve]
protected override void OnCreate()
{
base.OnCreate();
m_Systems.Add(base.World.GetOrCreateSystemManaged<TutorialControlSchemeDeactivationSystem>());
m_Systems.Add(base.World.GetOrCreateSystemManaged<TutorialUIDeactivationSystem>());
m_Systems.Add(base.World.GetOrCreateSystemManaged<TutorialObjectSelectionDeactivationSystem>());
m_Systems.Add(base.World.GetOrCreateSystemManaged<TutorialInfoviewDeactivationSystem>());
base.Enabled = false;
}