class ECS::Systems

Overview

Group of systems to process EcsWorld instance. You can add Systems to Systems to create hierarchy. You can either create Systems directly or (preferred way) inherit from ECS::Systems to add systems in initialize

Defined in:

myecs.cr

Constructors

Instance Method Summary

Instance methods inherited from class ECS::System

active : Bool active, active=(active : Bool) active=, execute execute, filter(world : World) : Filter | Nil filter, init init, process(entity : Entity) process, teardown teardown

Constructor methods inherited from class ECS::System

new(world : ECS::World) new

Constructor Detail

def self.new(world : World) #

creates empty Systems group. This method should be overriden in children to automatically add systems.


[View source]

Instance Method Detail

def add(sys : System) #

Adds system to a group


[View source]
def add(sys : System.class) #

Creates system of given class and adds it to a group


[View source]
def children : Array(ECS::System) #

List of systems in a group. This list must not be modified directly. Instead, use #add to add systems to it and ECS::System#active to disable systems


[View source]
def execute #

calls #execute and process for all active children


[View source]
def init #

calls #init for all children systems also initializes filters for children systems


[View source]
def remove_singleframe(typ) #

Adds RemoveAllOf instance for specified component type


[View source]
def teardown #

calls #teardown for all children systems


[View source]