felecs 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.byebug_history +20 -0
- data/.gitignore +17 -0
- data/.inch.yml +11 -0
- data/.rspec +1 -0
- data/.rubocop.yml +13 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.mdown +80 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +87 -0
- data/LICENSE +21 -0
- data/README.mdown +465 -0
- data/Rakefile +66 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docs/CNAME +1 -0
- data/docs/FelECS/ComponentManager.html +1239 -0
- data/docs/FelECS/Components.html +337 -0
- data/docs/FelECS/Entities.html +792 -0
- data/docs/FelECS/Order.html +251 -0
- data/docs/FelECS/Scenes.html +765 -0
- data/docs/FelECS/Stage.html +572 -0
- data/docs/FelECS/Systems.html +1505 -0
- data/docs/FelECS.html +335 -0
- data/docs/FelFlame/ComponentManager.html +1239 -0
- data/docs/FelFlame/Components.html +333 -0
- data/docs/FelFlame/Entities.html +792 -0
- data/docs/FelFlame/Helper/ComponentManager.html +1627 -0
- data/docs/FelFlame/Helper.html +142 -0
- data/docs/FelFlame/Order.html +251 -0
- data/docs/FelFlame/Scenes.html +765 -0
- data/docs/FelFlame/Stage.html +572 -0
- data/docs/FelFlame/Systems.html +1505 -0
- data/docs/FelFlame.html +319 -0
- data/docs/Felflame_.html +143 -0
- data/docs/_index.html +188 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +560 -0
- data/docs/file.version.html +74 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +560 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +419 -0
- data/docs/top-level-namespace.html +137 -0
- data/felecs.gemspec +45 -0
- data/lib/felecs/component_manager.rb +279 -0
- data/lib/felecs/entity_manager.rb +160 -0
- data/lib/felecs/order.rb +24 -0
- data/lib/felecs/scene_manager.rb +69 -0
- data/lib/felecs/stage_manager.rb +47 -0
- data/lib/felecs/system_manager.rb +258 -0
- data/lib/felecs/version.rb +9 -0
- data/lib/felecs.rb +67 -0
- data/mrbgem/mrbgem.rake +4 -0
- data/mrbgem/mrblib/felecs.rb +913 -0
- metadata +229 -0
@@ -0,0 +1,572 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: FelECS::Stage
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.26
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "FelECS::Stage";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Stage</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: FelECS::Stage
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/felecs.rb<span class="defines">,<br />
|
82
|
+
lib/felecs/stage_manager.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>Stores Scenes you add to it which you want to execute on each frame. When called upon will execute all Systems in the Scenes in the Stage and will execute them according to their priority order.</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
104
|
+
<ul class="summary">
|
105
|
+
|
106
|
+
<li class="public ">
|
107
|
+
<span class="summary_signature">
|
108
|
+
|
109
|
+
<a href="#scenes-class_method" title="scenes (class method)">.<strong>scenes</strong> ⇒ Array<Scene> </a>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
</span>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<span class="note title readonly">readonly</span>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<span class="summary_desc"><div class='inline'>
|
129
|
+
<p>Contains all the Scenes added to the Stage.</p>
|
130
|
+
</div></span>
|
131
|
+
|
132
|
+
</li>
|
133
|
+
|
134
|
+
|
135
|
+
</ul>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<h2>
|
142
|
+
Class Method Summary
|
143
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
144
|
+
</h2>
|
145
|
+
|
146
|
+
<ul class="summary">
|
147
|
+
|
148
|
+
<li class="public ">
|
149
|
+
<span class="summary_signature">
|
150
|
+
|
151
|
+
<a href="#add-class_method" title="add (class method)">.<strong>add</strong>(*scenes_to_add) ⇒ Boolean </a>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
</span>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<span class="summary_desc"><div class='inline'>
|
166
|
+
<p>Add any number of Scenes to the Stage.</p>
|
167
|
+
</div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#call-class_method" title="call (class method)">.<strong>call</strong> ⇒ Boolean </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>Executes one frame of the game.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#clear-class_method" title="clear (class method)">.<strong>clear</strong> ⇒ Boolean </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>Clears all Scenes that were added to the Stage.</p>
|
215
|
+
</div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#remove-class_method" title="remove (class method)">.<strong>remove</strong>(*scenes_to_remove) ⇒ Boolean </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'>
|
238
|
+
<p>Remove any number of Scenes from the Stage.</p>
|
239
|
+
</div></span>
|
240
|
+
|
241
|
+
</li>
|
242
|
+
|
243
|
+
|
244
|
+
</ul>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<div id="class_attr_details" class="attr_details">
|
249
|
+
<h2>Class Attribute Details</h2>
|
250
|
+
|
251
|
+
|
252
|
+
<span id="scenes=-class_method"></span>
|
253
|
+
<div class="method_details first">
|
254
|
+
<h3 class="signature first" id="scenes-class_method">
|
255
|
+
|
256
|
+
.<strong>scenes</strong> ⇒ <tt>Array<Scene></tt>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</h3><div class="docstring">
|
263
|
+
<div class="discussion">
|
264
|
+
|
265
|
+
<p>Contains all the Scenes added to the Stage</p>
|
266
|
+
|
267
|
+
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
<div class="tags">
|
271
|
+
|
272
|
+
<p class="tag_title">Returns:</p>
|
273
|
+
<ul class="return">
|
274
|
+
|
275
|
+
<li>
|
276
|
+
|
277
|
+
|
278
|
+
<span class='type'>(<tt>Array<Scene></tt>)</span>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
</li>
|
283
|
+
|
284
|
+
</ul>
|
285
|
+
|
286
|
+
</div><table class="source_code">
|
287
|
+
<tr>
|
288
|
+
<td>
|
289
|
+
<pre class="lines">
|
290
|
+
|
291
|
+
|
292
|
+
42
|
293
|
+
43
|
294
|
+
44</pre>
|
295
|
+
</td>
|
296
|
+
<td>
|
297
|
+
<pre class="code"><span class="info file"># File 'lib/felecs/stage_manager.rb', line 42</span>
|
298
|
+
|
299
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_scenes'>scenes</span>
|
300
|
+
<span class='ivar'>@scenes</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
301
|
+
<span class='kw'>end</span></pre>
|
302
|
+
</td>
|
303
|
+
</tr>
|
304
|
+
</table>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
</div>
|
308
|
+
|
309
|
+
|
310
|
+
<div id="class_method_details" class="method_details_list">
|
311
|
+
<h2>Class Method Details</h2>
|
312
|
+
|
313
|
+
|
314
|
+
<div class="method_details first">
|
315
|
+
<h3 class="signature first" id="add-class_method">
|
316
|
+
|
317
|
+
.<strong>add</strong>(*scenes_to_add) ⇒ <tt>Boolean</tt>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
</h3><div class="docstring">
|
324
|
+
<div class="discussion">
|
325
|
+
|
326
|
+
<p>Add any number of Scenes to the Stage</p>
|
327
|
+
|
328
|
+
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
<div class="tags">
|
332
|
+
|
333
|
+
<p class="tag_title">Returns:</p>
|
334
|
+
<ul class="return">
|
335
|
+
|
336
|
+
<li>
|
337
|
+
|
338
|
+
|
339
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
—
|
344
|
+
<div class='inline'>
|
345
|
+
<p><code>true</code></p>
|
346
|
+
</div>
|
347
|
+
|
348
|
+
</li>
|
349
|
+
|
350
|
+
</ul>
|
351
|
+
|
352
|
+
</div><table class="source_code">
|
353
|
+
<tr>
|
354
|
+
<td>
|
355
|
+
<pre class="lines">
|
356
|
+
|
357
|
+
|
358
|
+
13
|
359
|
+
14
|
360
|
+
15
|
361
|
+
16
|
362
|
+
17</pre>
|
363
|
+
</td>
|
364
|
+
<td>
|
365
|
+
<pre class="code"><span class="info file"># File 'lib/felecs/stage_manager.rb', line 13</span>
|
366
|
+
|
367
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span><span class='rparen'>)</span>
|
368
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>|=</span> <span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span>
|
369
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>=</span> <span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:priority</span><span class='rparen'>)</span>
|
370
|
+
<span class='kw'>true</span>
|
371
|
+
<span class='kw'>end</span></pre>
|
372
|
+
</td>
|
373
|
+
</tr>
|
374
|
+
</table>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div class="method_details ">
|
378
|
+
<h3 class="signature " id="call-class_method">
|
379
|
+
|
380
|
+
.<strong>call</strong> ⇒ <tt>Boolean</tt>
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</h3><div class="docstring">
|
387
|
+
<div class="discussion">
|
388
|
+
|
389
|
+
<p>Executes one frame of the game. This executes all the Scenes added to the Stage in order of their priority.</p>
|
390
|
+
|
391
|
+
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
<div class="tags">
|
395
|
+
|
396
|
+
<p class="tag_title">Returns:</p>
|
397
|
+
<ul class="return">
|
398
|
+
|
399
|
+
<li>
|
400
|
+
|
401
|
+
|
402
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
—
|
407
|
+
<div class='inline'>
|
408
|
+
<p><code>true</code></p>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
</li>
|
412
|
+
|
413
|
+
</ul>
|
414
|
+
|
415
|
+
</div><table class="source_code">
|
416
|
+
<tr>
|
417
|
+
<td>
|
418
|
+
<pre class="lines">
|
419
|
+
|
420
|
+
|
421
|
+
35
|
422
|
+
36
|
423
|
+
37
|
424
|
+
38</pre>
|
425
|
+
</td>
|
426
|
+
<td>
|
427
|
+
<pre class="code"><span class="info file"># File 'lib/felecs/stage_manager.rb', line 35</span>
|
428
|
+
|
429
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
430
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:call</span><span class='rparen'>)</span>
|
431
|
+
<span class='kw'>true</span>
|
432
|
+
<span class='kw'>end</span></pre>
|
433
|
+
</td>
|
434
|
+
</tr>
|
435
|
+
</table>
|
436
|
+
</div>
|
437
|
+
|
438
|
+
<div class="method_details ">
|
439
|
+
<h3 class="signature " id="clear-class_method">
|
440
|
+
|
441
|
+
.<strong>clear</strong> ⇒ <tt>Boolean</tt>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
</h3><div class="docstring">
|
448
|
+
<div class="discussion">
|
449
|
+
|
450
|
+
<p>Clears all Scenes that were added to the Stage</p>
|
451
|
+
|
452
|
+
|
453
|
+
</div>
|
454
|
+
</div>
|
455
|
+
<div class="tags">
|
456
|
+
|
457
|
+
<p class="tag_title">Returns:</p>
|
458
|
+
<ul class="return">
|
459
|
+
|
460
|
+
<li>
|
461
|
+
|
462
|
+
|
463
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
—
|
468
|
+
<div class='inline'>
|
469
|
+
<p><code>true</code></p>
|
470
|
+
</div>
|
471
|
+
|
472
|
+
</li>
|
473
|
+
|
474
|
+
</ul>
|
475
|
+
|
476
|
+
</div><table class="source_code">
|
477
|
+
<tr>
|
478
|
+
<td>
|
479
|
+
<pre class="lines">
|
480
|
+
|
481
|
+
|
482
|
+
28
|
483
|
+
29
|
484
|
+
30
|
485
|
+
31</pre>
|
486
|
+
</td>
|
487
|
+
<td>
|
488
|
+
<pre class="code"><span class="info file"># File 'lib/felecs/stage_manager.rb', line 28</span>
|
489
|
+
|
490
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
|
491
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
492
|
+
<span class='kw'>true</span>
|
493
|
+
<span class='kw'>end</span></pre>
|
494
|
+
</td>
|
495
|
+
</tr>
|
496
|
+
</table>
|
497
|
+
</div>
|
498
|
+
|
499
|
+
<div class="method_details ">
|
500
|
+
<h3 class="signature " id="remove-class_method">
|
501
|
+
|
502
|
+
.<strong>remove</strong>(*scenes_to_remove) ⇒ <tt>Boolean</tt>
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
</h3><div class="docstring">
|
509
|
+
<div class="discussion">
|
510
|
+
|
511
|
+
<p>Remove any number of Scenes from the Stage</p>
|
512
|
+
|
513
|
+
|
514
|
+
</div>
|
515
|
+
</div>
|
516
|
+
<div class="tags">
|
517
|
+
|
518
|
+
<p class="tag_title">Returns:</p>
|
519
|
+
<ul class="return">
|
520
|
+
|
521
|
+
<li>
|
522
|
+
|
523
|
+
|
524
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
—
|
529
|
+
<div class='inline'>
|
530
|
+
<p><code>true</code></p>
|
531
|
+
</div>
|
532
|
+
|
533
|
+
</li>
|
534
|
+
|
535
|
+
</ul>
|
536
|
+
|
537
|
+
</div><table class="source_code">
|
538
|
+
<tr>
|
539
|
+
<td>
|
540
|
+
<pre class="lines">
|
541
|
+
|
542
|
+
|
543
|
+
21
|
544
|
+
22
|
545
|
+
23
|
546
|
+
24</pre>
|
547
|
+
</td>
|
548
|
+
<td>
|
549
|
+
<pre class="code"><span class="info file"># File 'lib/felecs/stage_manager.rb', line 21</span>
|
550
|
+
|
551
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span><span class='rparen'>)</span>
|
552
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>-=</span> <span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span>
|
553
|
+
<span class='kw'>true</span>
|
554
|
+
<span class='kw'>end</span></pre>
|
555
|
+
</td>
|
556
|
+
</tr>
|
557
|
+
</table>
|
558
|
+
</div>
|
559
|
+
|
560
|
+
</div>
|
561
|
+
|
562
|
+
</div>
|
563
|
+
|
564
|
+
<div id="footer">
|
565
|
+
Generated on Wed Feb 2 03:29:07 2022 by
|
566
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
567
|
+
0.9.26 (ruby-2.7.3).
|
568
|
+
</div>
|
569
|
+
|
570
|
+
</div>
|
571
|
+
</body>
|
572
|
+
</html>
|