felflame 1.0.2 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.ruby-version +1 -0
- data/CHANGELOG.mdown +56 -1
- data/Gemfile +2 -3
- data/Gemfile.lock +4 -4
- data/README.mdown +127 -74
- data/Rakefile +30 -10
- data/bin/console +3 -3
- data/docs/FelFlame/ComponentManager.html +131 -519
- data/docs/FelFlame/Components.html +29 -119
- data/docs/FelFlame/Entities.html +125 -387
- data/docs/FelFlame/Order.html +251 -0
- data/docs/FelFlame/Scenes.html +72 -68
- data/docs/FelFlame/Stage.html +30 -56
- data/docs/FelFlame/Systems.html +208 -244
- data/docs/FelFlame.html +34 -32
- data/docs/Felflame_.html +143 -0
- data/docs/_index.html +24 -4
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +145 -83
- data/docs/file.version.html +74 -0
- data/docs/index.html +145 -83
- data/docs/method_list.html +52 -108
- data/docs/top-level-namespace.html +5 -5
- data/felflame.gemspec +21 -21
- data/lib/felflame/component_manager.rb +99 -71
- data/lib/felflame/entity_manager.rb +84 -59
- data/lib/felflame/order.rb +24 -0
- data/lib/felflame/scene_manager.rb +23 -12
- data/lib/felflame/stage_manager.rb +10 -33
- data/lib/felflame/system_manager.rb +92 -47
- data/lib/felflame/version.rb +5 -1
- data/lib/felflame.rb +26 -15
- metadata +35 -31
- data/.yardopts +0 -13
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
|
-
|
7
|
+
Module: FelFlame::Components
|
8
8
|
|
9
9
|
— Documentation by YARD 0.9.26
|
10
10
|
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<div id="menu">
|
38
38
|
|
39
39
|
<a href="../_index.html">Index (C)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
40
|
+
<span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span>
|
41
41
|
»
|
42
42
|
<span class="title">Components</span>
|
43
43
|
|
@@ -59,37 +59,16 @@
|
|
59
59
|
<div class="clear"></div>
|
60
60
|
</div>
|
61
61
|
|
62
|
-
<div id="content"><h1>
|
62
|
+
<div id="content"><h1>Module: FelFlame::Components
|
63
63
|
|
64
64
|
|
65
65
|
|
66
66
|
</h1>
|
67
67
|
<div class="box_info">
|
68
68
|
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">FelFlame::Components</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
69
|
|
86
70
|
|
87
71
|
|
88
|
-
<dl>
|
89
|
-
<dt>Extended by:</dt>
|
90
|
-
<dd>Enumerable</dd>
|
91
|
-
</dl>
|
92
|
-
|
93
72
|
|
94
73
|
|
95
74
|
|
@@ -99,8 +78,8 @@
|
|
99
78
|
|
100
79
|
<dl>
|
101
80
|
<dt>Defined in:</dt>
|
102
|
-
<dd>felflame.rb<span class="defines">,<br />
|
103
|
-
component_manager.rb</span>
|
81
|
+
<dd>lib/felflame.rb<span class="defines">,<br />
|
82
|
+
lib/felflame/component_manager.rb</span>
|
104
83
|
</dd>
|
105
84
|
</dl>
|
106
85
|
|
@@ -109,7 +88,7 @@
|
|
109
88
|
<h2>Overview</h2><div class="docstring">
|
110
89
|
<div class="discussion">
|
111
90
|
|
112
|
-
<p>Creates component managers and allows accessing them them under the <span class='object_link'><a href="" title="FelFlame::Components (
|
91
|
+
<p>Creates component managers and allows accessing them them under the <span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span> namespace as Constants. You can use array methods directly on this class to access Component Managers.</p>
|
113
92
|
|
114
93
|
<p>To see how component managers are used please look at the <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> documentation.</p>
|
115
94
|
|
@@ -137,30 +116,6 @@
|
|
137
116
|
<li class="public ">
|
138
117
|
<span class="summary_signature">
|
139
118
|
|
140
|
-
<a href="#each-class_method" title="each (class method)">.<strong>each</strong>(&block) ⇒ Enumerator </a>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
</span>
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<span class="summary_desc"><div class='inline'>
|
155
|
-
<p>Iterate over all existing component managers.</p>
|
156
|
-
</div></span>
|
157
|
-
|
158
|
-
</li>
|
159
|
-
|
160
|
-
|
161
|
-
<li class="public ">
|
162
|
-
<span class="summary_signature">
|
163
|
-
|
164
119
|
<a href="#new-class_method" title="new (class method)">.<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) ⇒ ComponentManager </a>
|
165
120
|
|
166
121
|
|
@@ -186,68 +141,13 @@
|
|
186
141
|
|
187
142
|
|
188
143
|
|
189
|
-
|
190
144
|
|
191
145
|
<div id="class_method_details" class="method_details_list">
|
192
146
|
<h2>Class Method Details</h2>
|
193
147
|
|
194
148
|
|
195
149
|
<div class="method_details first">
|
196
|
-
<h3 class="signature first" id="
|
197
|
-
|
198
|
-
.<strong>each</strong>(&block) ⇒ <tt>Enumerator</tt>
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
</h3><div class="docstring">
|
205
|
-
<div class="discussion">
|
206
|
-
|
207
|
-
<p>Iterate over all existing component managers. You also call other enumerable methods instead of each, such as <code>each_with_index</code> or <code>select</code></p>
|
208
|
-
|
209
|
-
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
<div class="tags">
|
213
|
-
|
214
|
-
<p class="tag_title">Returns:</p>
|
215
|
-
<ul class="return">
|
216
|
-
|
217
|
-
<li>
|
218
|
-
|
219
|
-
|
220
|
-
<span class='type'>(<tt>Enumerator</tt>)</span>
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
</li>
|
225
|
-
|
226
|
-
</ul>
|
227
|
-
|
228
|
-
</div><table class="source_code">
|
229
|
-
<tr>
|
230
|
-
<td>
|
231
|
-
<pre class="lines">
|
232
|
-
|
233
|
-
|
234
|
-
47
|
235
|
-
48
|
236
|
-
49</pre>
|
237
|
-
</td>
|
238
|
-
<td>
|
239
|
-
<pre class="code"><span class="info file"># File 'component_manager.rb', line 47</span>
|
240
|
-
|
241
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
242
|
-
<span class='id identifier rubyid_constants'>constants</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
243
|
-
<span class='kw'>end</span></pre>
|
244
|
-
</td>
|
245
|
-
</tr>
|
246
|
-
</table>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<div class="method_details ">
|
250
|
-
<h3 class="signature " id="new-class_method">
|
150
|
+
<h3 class="signature first" id="new-class_method">
|
251
151
|
|
252
152
|
.<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) ⇒ <tt><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></tt>
|
253
153
|
|
@@ -273,7 +173,7 @@
|
|
273
173
|
</span><span class='comment'># while max and current are nil until set.
|
274
174
|
</span><span class='comment'># When you make a new component using this component manager
|
275
175
|
</span><span class='comment'># these are the values and accessors it will have.
|
276
|
-
</span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
176
|
+
</span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Component</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Health</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:max</span><span class='comma'>,</span> <span class='symbol'>:current</span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>red</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
277
177
|
|
278
178
|
</div>
|
279
179
|
<p class="tag_title">Parameters:</p>
|
@@ -349,7 +249,6 @@
|
|
349
249
|
<pre class="lines">
|
350
250
|
|
351
251
|
|
352
|
-
19
|
353
252
|
20
|
354
253
|
21
|
355
254
|
22
|
@@ -373,35 +272,46 @@
|
|
373
272
|
40
|
374
273
|
41
|
375
274
|
42
|
376
|
-
43
|
275
|
+
43
|
276
|
+
44
|
277
|
+
45
|
278
|
+
46
|
279
|
+
47
|
280
|
+
48
|
281
|
+
49</pre>
|
377
282
|
</td>
|
378
283
|
<td>
|
379
|
-
<pre class="code"><span class="info file"># File 'component_manager.rb', line
|
284
|
+
<pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 20</span>
|
380
285
|
|
381
286
|
<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='rparen'>)</span>
|
382
|
-
<span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
287
|
+
<span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
|
383
288
|
<span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Component Manager '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component_name'>component_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>' is already defined</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
384
289
|
<span class='kw'>end</span>
|
385
290
|
|
291
|
+
<span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
292
|
+
<span class='id identifier rubyid_update_const_cache'>update_const_cache</span>
|
386
293
|
|
387
|
-
<span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
388
294
|
<span class='id identifier rubyid_attrs'>attrs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='op'>|</span>
|
389
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
295
|
+
<span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
296
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The attribute name \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" is already a method</span><span class='tstring_end'>"</span></span>
|
297
|
+
<span class='kw'>end</span>
|
298
|
+
|
299
|
+
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='id identifier rubyid_attr'>attr</span>
|
390
300
|
<span class='kw'>end</span>
|
391
301
|
<span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid__default'>_default</span><span class='op'>|</span>
|
392
302
|
<span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid__default'>_default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
393
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
394
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
303
|
+
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='id identifier rubyid_attr'>attr</span>
|
304
|
+
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
395
305
|
<span class='id identifier rubyid_attr_changed_trigger_systems'>attr_changed_trigger_systems</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_equal?'>equal?</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span>
|
396
306
|
<span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
397
307
|
<span class='kw'>end</span>
|
398
308
|
<span class='kw'>end</span>
|
399
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
309
|
+
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='symbol'>:set_defaults</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
400
310
|
<span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='op'>|</span>
|
401
311
|
<span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
|
402
312
|
<span class='kw'>end</span>
|
403
313
|
<span class='kw'>end</span>
|
404
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
314
|
+
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
|
405
315
|
<span class='kw'>end</span></pre>
|
406
316
|
</td>
|
407
317
|
</tr>
|
@@ -413,7 +323,7 @@
|
|
413
323
|
</div>
|
414
324
|
|
415
325
|
<div id="footer">
|
416
|
-
Generated on
|
326
|
+
Generated on Tue Feb 1 23:28:33 2022 by
|
417
327
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
418
328
|
0.9.26 (ruby-2.7.3).
|
419
329
|
</div>
|