Class: BeltsEngine::Ecs::Entity
- Inherits:
-
Hash
- Object
- Hash
- BeltsEngine::Ecs::Entity
- Defined in:
- lib/belts_engine/ecs/entity.rb
Instance Method Summary collapse
- #add_components ⇒ Object
-
#initialize(id) ⇒ Entity
constructor
A new instance of Entity.
Constructor Details
#initialize(id) ⇒ Entity
Returns a new instance of Entity.
3 4 5 |
# File 'lib/belts_engine/ecs/entity.rb', line 3 def initialize(id) self[:id] = id end |
Instance Method Details
#add_components ⇒ Object
7 8 9 |
# File 'lib/belts_engine/ecs/entity.rb', line 7 def add_components() self[name] = value end |