felflame 1.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mdown +32 -1
- data/Gemfile.lock +4 -4
- data/README.mdown +18 -0
- data/docs/_index.html +1 -80
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +64 -40
- data/docs/index.html +64 -40
- data/docs/method_list.html +0 -424
- data/docs/top-level-namespace.html +1 -38
- data/lib/felflame/component_manager.rb +3 -2
- data/lib/felflame/entity_manager.rb +10 -11
- data/lib/felflame/version.rb +1 -1
- metadata +2 -3
- data/.yardopts +0 -13
@@ -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
|
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 |
|
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 |
|
45
|
-
|
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
|
62
|
-
component.entities.push
|
60
|
+
components[component.class] = [component]
|
61
|
+
component.entities.push self
|
63
62
|
check_systems component, :addition_triggers
|
64
|
-
elsif !components[component.class].include? component
|
65
|
-
components[component.class].push component
|
66
|
-
component.entities.push
|
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?
|
91
|
-
component.entities.delete
|
92
|
-
components[component.class].delete component
|
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
|
data/lib/felflame/version.rb
CHANGED
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:
|
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-
|
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