felflame 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,43 +78,6 @@
78
78
 
79
79
  </div>
80
80
 
81
- <h2>Defined Under Namespace</h2>
82
- <p class="children">
83
-
84
-
85
-
86
-
87
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span>
88
-
89
-
90
- </p>
91
-
92
-
93
- <h2>
94
- Constant Summary
95
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
96
- </h2>
97
-
98
- <dl class="constants">
99
-
100
- <dt id="FF-constant" class="">FF =
101
- <div class="docstring">
102
- <div class="discussion">
103
-
104
- <p>An alias for <span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></p>
105
-
106
-
107
- </div>
108
- </div>
109
- <div class="tags">
110
-
111
-
112
- </div>
113
- </dt>
114
- <dd><pre class="code"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span></pre></dd>
115
-
116
- </dl>
117
-
118
81
 
119
82
 
120
83
 
@@ -127,7 +90,7 @@
127
90
  </div>
128
91
 
129
92
  <div id="footer">
130
- Generated on Fri Jul 9 01:56:53 2021 by
93
+ Generated on Sat Jul 10 03:06:03 2021 by
131
94
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
95
  0.9.26 (ruby-2.7.3).
133
96
  </div>
@@ -220,8 +220,9 @@ class FelFlame
220
220
  # the remove command is called, breaking the loop if it
221
221
  # wasn't referencing a clone(will get Nil errors)
222
222
  iter = entities.map(&:clone)
223
- iter.each do |entity_id|
224
- FelFlame::Entities[entity_id].remove self #unless FelFlame::Entities[entity_id].nil?
223
+ iter.each do |entity|
224
+ #FelFlame::Entities[entity_id].remove self #unless FelFlame::Entities[entity_id].nil?
225
+ entity.remove self
225
226
  end
226
227
  self.class.data[id] = nil
227
228
  instance_variables.each do |var|
@@ -41,9 +41,8 @@ class FelFlame
41
41
  # @return [Boolean] +true+
42
42
  def delete
43
43
  components.each do |component_manager, component_array|
44
- component_array.each do |component_id|
45
- component_manager[component_id].entities.delete(id)
46
- #self.remove FelFlame::Components.const_get(component_manager.name)[component_id]
44
+ component_array.each do |component|
45
+ component.entities.delete(self)
47
46
  end
48
47
  end
49
48
  FelFlame::Entities.data[id] = nil
@@ -58,12 +57,12 @@ class FelFlame
58
57
  def add(*components_to_add)
59
58
  components_to_add.each do |component|
60
59
  if components[component.class].nil?
61
- components[component.class] = [component.id]
62
- component.entities.push id
60
+ components[component.class] = [component]
61
+ component.entities.push self
63
62
  check_systems component, :addition_triggers
64
- elsif !components[component.class].include? component.id
65
- components[component.class].push component.id
66
- component.entities.push id
63
+ elsif !components[component.class].include? component
64
+ components[component.class].push component
65
+ component.entities.push self
67
66
  check_systems component, :addition_triggers
68
67
  end
69
68
  end
@@ -87,9 +86,9 @@ class FelFlame
87
86
  # @return [Boolean] +true+
88
87
  def remove(*components_to_remove)
89
88
  components_to_remove.each do |component|
90
- check_systems component, :removal_triggers if component.entities.include? id
91
- component.entities.delete id
92
- components[component.class].delete component.id
89
+ check_systems component, :removal_triggers if component.entities.include? self
90
+ component.entities.delete self
91
+ components[component.class].delete component
93
92
  end
94
93
  true
95
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Felflame
4
- VERSION = "1.0.2"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: felflame
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tradam
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest-reporters
@@ -146,7 +146,6 @@ files:
146
146
  - ".inch.yml"
147
147
  - ".rspec"
148
148
  - ".rubocop.yml"
149
- - ".yardopts"
150
149
  - CHANGELOG.mdown
151
150
  - Gemfile
152
151
  - Gemfile.lock
data/.yardopts DELETED
@@ -1,13 +0,0 @@
1
- --readme README.mdown
2
- --markup=markdown|textile|rdoc(default)
3
- --protected
4
- --no-private
5
-
6
- LICENSE
7
- README.mdown
8
- system_manager.rb
9
- component_manager.rb
10
- entity_manager.rb
11
- scene_manager.rb
12
- stage_manager.rb
13
- felflame.rb