class Entitas::Contexts

Overview

This class gives access to each availble context.

Defined in:

entitas.cr
entitas/contexts.cr
entitas/generators/contexts.cr
entitas/macros/contexts.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.shared_instance : Entitas::Contexts #

This returns a pre-instantiated Entitas::Contexts instance which is available at the global scope.

Entitas::Contexts.shared_instance # => Entitas::Contexts

[View source]

Instance Method Detail

def all_contexts : Array(Entitas::IContext) #

Returns an array containing each available context


def each(&) #

[View source]
def get_context_by_name(name : String) #

Returns the context with the provided name, or nil


[View source]
def initialize_entity_indices #

Will be called after initialization to intitialze each EntityIndex for all of the contexts.


def reset #

Will call Entitas::Context#reset on each context.


[View source]
def shared_instance : Entitas::Contexts #

[View source]
def to_json(json : JSON::Builder) #

[View source]

Macro Detail

macro create_contexts_index_name(comp, var) #

[View source]