summaryrefslogtreecommitdiffhomepage
path: root/lib/felflame/component_manager.rb
diff options
context:
space:
mode:
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|