felflame 3.0.0 → 4.0.0
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 +47 -27
- data/Gemfile +2 -3
- data/Gemfile.lock +1 -1
- data/README.mdown +116 -81
- data/Rakefile +29 -9
- data/bin/console +3 -3
- data/docs/FelFlame/ComponentManager.html +129 -519
- data/docs/FelFlame/Components.html +22 -120
- data/docs/FelFlame/Entities.html +117 -377
- data/docs/FelFlame/Order.html +251 -0
- data/docs/FelFlame/Scenes.html +68 -66
- data/docs/FelFlame/Stage.html +28 -54
- data/docs/FelFlame/Systems.html +206 -242
- data/docs/FelFlame.html +32 -30
- data/docs/Felflame_.html +2 -2
- data/docs/_index.html +19 -4
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +125 -87
- data/docs/index.html +125 -87
- data/docs/method_list.html +37 -93
- data/docs/top-level-namespace.html +4 -6
- data/felflame.gemspec +21 -21
- data/lib/felflame/component_manager.rb +98 -71
- data/lib/felflame/entity_manager.rb +75 -49
- 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 +1 -1
- data/lib/felflame.rb +22 -14
- metadata +32 -29
@@ -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
|
|
@@ -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
|
-
51
|
235
|
-
52
|
236
|
-
53</pre>
|
237
|
-
</td>
|
238
|
-
<td>
|
239
|
-
<pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 51</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
|
@@ -377,39 +276,42 @@
|
|
377
276
|
44
|
378
277
|
45
|
379
278
|
46
|
380
|
-
47
|
279
|
+
47
|
280
|
+
48
|
281
|
+
49</pre>
|
381
282
|
</td>
|
382
283
|
<td>
|
383
|
-
<pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line
|
284
|
+
<pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 20</span>
|
384
285
|
|
385
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>
|
386
|
-
<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>
|
387
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>
|
388
289
|
<span class='kw'>end</span>
|
389
290
|
|
390
|
-
|
391
|
-
<span class='id identifier
|
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>
|
392
293
|
|
393
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>
|
394
|
-
<span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
395
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='
|
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>
|
396
297
|
<span class='kw'>end</span>
|
397
|
-
|
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>
|
398
300
|
<span class='kw'>end</span>
|
399
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>
|
400
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>
|
401
|
-
<span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (
|
402
|
-
<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>
|
403
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>
|
404
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>
|
405
307
|
<span class='kw'>end</span>
|
406
308
|
<span class='kw'>end</span>
|
407
|
-
<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>
|
408
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>
|
409
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>
|
410
312
|
<span class='kw'>end</span>
|
411
313
|
<span class='kw'>end</span>
|
412
|
-
<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>
|
413
315
|
<span class='kw'>end</span></pre>
|
414
316
|
</td>
|
415
317
|
</tr>
|
@@ -421,7 +323,7 @@
|
|
421
323
|
</div>
|
422
324
|
|
423
325
|
<div id="footer">
|
424
|
-
Generated on Mon
|
326
|
+
Generated on Mon Jan 3 08:23:04 2022 by
|
425
327
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
426
328
|
0.9.26 (ruby-2.7.3).
|
427
329
|
</div>
|