summaryrefslogtreecommitdiffhomepage
path: root/lib/felflame/component_manager.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-07-10 03:09:36 -0400
committerrealtradam <[email protected]>2021-07-10 03:09:36 -0400
commitaab35c0f098d695b7cf53c14a8b08a9b4a24550d (patch)
tree84dd6b9b5787fce8f1bab84761c80818fea783d7 /lib/felflame/component_manager.rb
parentfea1879f371d5c6d68439b9ab9c64d9a61d92d1c (diff)
downloadFelECS-aab35c0f098d695b7cf53c14a8b08a9b4a24550d.tar.gz
FelECS-aab35c0f098d695b7cf53c14a8b08a9b4a24550d.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.rb5
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|