class Garnet::Entity

Included Modules

Defined in:

entity.cr

Instance Method Summary

Instance Method Detail

def <<(action : Action) #

Actions


[View source]
def <<(sys : System) #

Systems


[View source]
def <<(entity : Entity) #

Children


[View source]
def <<(component : Component) #

Components


[View source]
def actions : Array(Garnet::Action) #

[View source]
def children : Array(Garnet::Entity) #

[View source]
def components : Hash(Symbol, Garnet::Component) #

[View source]
def dead=(dead : Bool) #

[View source]
def dead? : Bool #

[View source]
def delete(action : Action) #

[View source]
def delete(sys : System) #

[View source]
def delete(entity : Entity) #

[View source]
def kill! #

[View source]
def size #
Description copied from module Indexable(Garnet::Entity)

Returns the number of elements in this container.


[View source]
def systems : PriorityQueue(Garnet::System) #

[View source]
def unsafe_fetch(index : Int) #
Description copied from module Indexable(Garnet::Entity)

Returns the element at the given index, without doing any bounds check.

Indexable makes sure to invoke this method with index in 0...size, so converting negative indices to positive ones is not needed here.

Clients never invoke this method directly. Instead, they access elements with #[](index) and #[]?(index).

This method should only be directly invoked if you are absolutely sure the index is in bounds, to avoid a bounds check for a small boost of performance.


[View source]
def update(delta_time : Float32) #

[View source]