class Entitas::Systems
- Entitas::Systems
- Reference
- Object
Overview
Systems provide a convenient way to group systems.
You can add InitializeSystem
, ExecuteSystem
, CleanupSystem
,
TearDownSystem
, ReactiveSystem
and other nested Systems instances.
All systems will be initialized and executed based on the order
you added them.
Included Modules
- Entitas::Systems::CleanupSystem
- Entitas::Systems::ExecuteSystem
- Entitas::Systems::InitializeSystem
- Entitas::Systems::TearDownSystem
Direct Known Subclasses
Defined in:
entitas.crentitas/systems.cr
Constant Summary
-
Log =
::Log.for(self)
Instance Method Summary
-
#<<(sys : Entitas::System)
Adds the system instance to the systems list.
-
#activate_reactive_systems : Nil
Activates all
ReactiveSystems
in the systems list. -
#add(sys : Entitas::System) : Systems
Adds the system instance to the systems list.
-
#cleanup : Nil
Calls
#cleanup
on allCleanupSystem
and other nestedSystems
instances in the order you added them. -
#clear_reactive_systems
Clears all
ReactiveSystems
in the systems list. -
#deactivate_reactive_systems : Nil
Deactivates all ReactiveSystems in the systems list.
-
#execute : Nil
Calls
#execute
on allExecuteSystem
and other nestedSystems
instances in the order you added them. -
#find_system(klass : Class) : Entitas::System | Nil
Recusivly searches for sub systems with the type provided and returns the first match
-
#find_systems(klass : Class) : Array(Entitas::System)
Recusivly searches for sub systems with the type provided and returns all matches
-
#init : Nil
Calls
#init
on allInitializeSystem
and other nestedSystems
instances in the order you added them. -
#tear_down : Nil
Calls
#tear_down
on allTearDownSystem
and other nestedSystems
instances in the order you added them.
Instance methods inherited from module Entitas::Systems::TearDownSystem
tear_down
tear_down
Instance methods inherited from module Entitas::System
to_json(json : JSON::Builder)
to_json
Instance methods inherited from module Entitas::Systems::InitializeSystem
init
init
Instance methods inherited from module Entitas::System
to_json(json : JSON::Builder)
to_json
Instance methods inherited from module Entitas::Systems::ExecuteSystem
execute
execute
Instance methods inherited from module Entitas::System
to_json(json : JSON::Builder)
to_json
Instance methods inherited from module Entitas::Systems::CleanupSystem
cleanup
cleanup
Instance methods inherited from module Entitas::System
to_json(json : JSON::Builder)
to_json
Instance Method Detail
Adds the system instance to the systems list.
Calls #cleanup
on all CleanupSystem
and other
nested Systems
instances in the order you added them.
Deactivates all ReactiveSystems in the systems list. This will also clear all ReactiveSystems. This is useful when you want to soft-restart your application and want to reuse your existing system instances.
Calls #execute
on all ExecuteSystem
and other
nested Systems
instances in the order you added them.
Recusivly searches for sub systems with the type provided and returns the first match
Recusivly searches for sub systems with the type provided and returns all matches
Calls #init
on all InitializeSystem
and other
nested Systems
instances in the order you added them.
Calls #tear_down
on all TearDownSystem
and other
nested Systems
instances in the order you added them.