diff options
| author | realtradam <[email protected]> | 2021-07-10 03:09:36 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-07-10 03:09:36 -0400 |
| commit | aab35c0f098d695b7cf53c14a8b08a9b4a24550d (patch) | |
| tree | 84dd6b9b5787fce8f1bab84761c80818fea783d7 /lib/felflame/component_manager.rb | |
| parent | fea1879f371d5c6d68439b9ab9c64d9a61d92d1c (diff) | |
| download | FelECS-2.0.0.tar.gz FelECS-2.0.0.zip | |
entities and components now reference each other with objects2.0.0
Diffstat (limited to 'lib/felflame/component_manager.rb')
| -rw-r--r-- | lib/felflame/component_manager.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/felflame/component_manager.rb b/lib/felflame/component_manager.rb index e6c6d91..43932d2 100644 --- a/lib/felflame/component_manager.rb +++ b/lib/felflame/component_manager.rb @@ -220,8 +220,9 @@ class FelFlame # the remove command is called, breaking the loop if it # wasn't referencing a clone(will get Nil errors) iter = entities.map(&:clone) - iter.each do |entity_id| - FelFlame::Entities[entity_id].remove self #unless FelFlame::Entities[entity_id].nil? + iter.each do |entity| + #FelFlame::Entities[entity_id].remove self #unless FelFlame::Entities[entity_id].nil? + entity.remove self end self.class.data[id] = nil instance_variables.each do |var| |
