Method: FelFlame::Entities#initialize

Defined in:
lib/felflame/entity_manager.rb

#initialize(*components) ⇒ Entity

Creating a new Entity

Parameters:

  • Can be any number of components, identical duplicates will be automatically purged however different components from the same component manager are allowed.



8
9
10
11
12
# File 'lib/felflame/entity_manager.rb', line 8

def initialize(*components)
  # Add each component
  add(*components)
  self.class._data.push self
end