SystemManager class

System manager for coordinating engine subsystems

This class acts as a registry for all engine subsystems, allowing them to be accessed by name or type. It also manages their lifecycle.

Example usage:

final systemManager = SystemManager();
systemManager.registerSystem('physics', physicsEngine);
final physics = systemManager.getSystem<PhysicsEngine>();
Implemented types

Constructors

SystemManager()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
Check if initialized
no setter
lastFrameMs → double
Total scheduler frame time in milliseconds.
no setter
lastTaskTimesMs → UnmodifiableMapView<String, double>
Latest task timings in milliseconds.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schedulerStats → Map<String, dynamic>
Latest scheduler timing snapshot.
no setter
systemCount → int
Get the number of registered systems
no setter

Methods

clear() → void
Clear all registered systems
dispose() → void
Dispose the registry/scheduler state.
override
getSystem<T>() → T?
Get a system by type
getSystemByName(String name) → dynamic
Get a system by name
getSystemNames() → List<String>
Get all registered system names
getSystems() → List
Get all registered systems
hasSystem(String name) → bool
Check if a system is registered by name
hasSystemOfType<T>() → bool
Check if a system type is registered
initialize() → Future<bool>
Initialize the system manager
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printSystemInfo() → void
Print information about all registered systems
registerSystem<T>(String name, T system) → void
Register a system with the manager
registerUpdateTask(String name, UpdateTask task) → void
Register an ordered frame update task.
runUpdateCycle(double deltaTime) → void
Execute one scheduled update cycle in registration order.
toString() → String
A string representation of this object.
inherited
unregisterSystem(String name) → bool
Unregister a system by name
unregisterUpdateTask(String name) → bool
Remove an update task from the scheduler.

Operators

operator ==(Object other) → bool
The equality operator.
inherited