class CES::Entity

entity class (each separate entity)

Attributes

eid[R]

Public Class Methods

entity_list() click to toggle source
# File lib/entity.rb, line 24
def self.entity_list
        return @@entity_list
end
new(*components) click to toggle source

components -> Array<String component_name>

# File lib/entity.rb, line 9
def initialize(*components)
        if(components == nil)
                components = []
        end

        @eid = @@entity_list.keys.length + 1 # eids start counting at 1: entity 1, entity 2, entity 3, etc
        @@entity_list[eid] = self
        
        components.each { |component|
                CES::ComponentReference.register(component, @eid)
        }
        
        return self
end