BaseSystem.md

November 22, 2024 · View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.Systems

BaseSystem Class

Base class for all systems either a query system, a custom system or a system group.

public abstract class BaseSystem

Inheritance System.Object 🡒 BaseSystem

Derived
QuerySystemBase
SystemGroup

Properties
EnabledIf true the system is executed when calling Update(UpdateTick)
IdUnique system id of all systems of a SystemRoot.
NameThe system name. The Name of a SystemGroup can be changed.
ParentGroupThe parent SystemGroup containing this system.
PerfProvide execution statistics of a system if MonitorPerf is enabled.
SystemRootThe SystemRoot containing this system.
TickThe UpdateTick passed to Update(UpdateTick).
Methods
AppendPerfLog(StringBuilder)Add performance statistics formatted as a table to the given System.Text.StringBuilder without memory allocations.
CastSystemUpdate(string, object)Send an event to OnSystemChanged handlers to notify a changed system field.
GetPerfLog()Returns performance statistics formatted as a table intended for logging.
MoveSystemTo(SystemGroup, int)Move the system to the specified targetGroup at the given index.
If index is -1 the system is moved to the tail of the group.
OnAddStore(EntityStore)
OnRemoveStore(EntityStore)
OnUpdateGroup()Called for every system of the parent ChildSystems.
OnUpdateGroupBegin()Called for every system of the parent ChildSystems before group OnUpdateGroup().
OnUpdateGroupEnd()Called for every system of the parent ChildSystems after group OnUpdateGroup().
Events
OnSystemChangedEvent handlers to notify a system has changed.
Like a changed system field or a system added / removed to / from a SystemGroup.