felflame 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.byebug_history +20 -0
  3. data/.gitignore +17 -0
  4. data/.inch.yml +11 -0
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +13 -0
  7. data/.yardopts +13 -0
  8. data/CHANGELOG.md +5 -0
  9. data/Gemfile +11 -0
  10. data/Gemfile.lock +87 -0
  11. data/LICENSE +21 -0
  12. data/LICENSE.txt +21 -0
  13. data/README.mdown +410 -0
  14. data/Rakefile +45 -0
  15. data/bin/console +15 -0
  16. data/bin/setup +8 -0
  17. data/codeclimate/export-coverage.rb +16 -0
  18. data/deprecated/components/00_renderable.rb +19 -0
  19. data/deprecated/components/01_sprite.rb +57 -0
  20. data/deprecated/components/02_label.rb +32 -0
  21. data/deprecated/components/03_player_control.rb +26 -0
  22. data/deprecated/components/04_map.rb +21 -0
  23. data/deprecated/components/05_interactable.rb +16 -0
  24. data/deprecated/components/06_collidable.rb +22 -0
  25. data/deprecated/components/07_battle.rb +4 -0
  26. data/deprecated/components/07_indoor.rb +4 -0
  27. data/deprecated/components/07_overworld.rb +16 -0
  28. data/deprecated/components/debug_singleton.rb +13 -0
  29. data/deprecated/helpers/00_tileset.rb +56 -0
  30. data/deprecated/helpers/01_component.rb +74 -0
  31. data/deprecated/systems/00_update_levels.rb +34 -0
  32. data/deprecated/systems/10_player.rb +41 -0
  33. data/deprecated/systems/99_render.rb +37 -0
  34. data/docs/CNAME +1 -0
  35. data/docs/FelFlame.html +317 -0
  36. data/docs/FelFlame/ComponentManager.html +1627 -0
  37. data/docs/FelFlame/Components.html +423 -0
  38. data/docs/FelFlame/Entities.html +1054 -0
  39. data/docs/FelFlame/Helper.html +142 -0
  40. data/docs/FelFlame/Helper/ComponentManager.html +1627 -0
  41. data/docs/FelFlame/Scenes.html +761 -0
  42. data/docs/FelFlame/Stage.html +598 -0
  43. data/docs/FelFlame/Systems.html +1541 -0
  44. data/docs/_index.html +173 -0
  45. data/docs/class_list.html +51 -0
  46. data/docs/css/common.css +1 -0
  47. data/docs/css/full_list.css +58 -0
  48. data/docs/css/style.css +497 -0
  49. data/docs/file.README.html +498 -0
  50. data/docs/file_list.html +56 -0
  51. data/docs/frames.html +17 -0
  52. data/docs/index.html +498 -0
  53. data/docs/js/app.js +314 -0
  54. data/docs/js/full_list.js +216 -0
  55. data/docs/js/jquery.js +4 -0
  56. data/docs/method_list.html +475 -0
  57. data/docs/top-level-namespace.html +137 -0
  58. data/felflame.gemspec +45 -0
  59. data/lib/felflame.rb +59 -0
  60. data/lib/felflame/component_manager.rb +245 -0
  61. data/lib/felflame/entity_manager.rb +135 -0
  62. data/lib/felflame/scene_manager.rb +58 -0
  63. data/lib/felflame/stage_manager.rb +70 -0
  64. data/lib/felflame/system_manager.rb +213 -0
  65. data/lib/felflame/version.rb +5 -0
  66. data/logos/felflame-logo-text.png +0 -0
  67. data/logos/felflame-logo-text.svg +172 -0
  68. data/logos/felflame-logo.png +0 -0
  69. data/logos/felflame-logo.svg +97 -0
  70. metadata +239 -0
@@ -0,0 +1,142 @@
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
+ Class: FelFlame::Helper
8
+
9
+ &mdash; 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 = "FelFlame::Helper";
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 (H)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span>
41
+ &raquo;
42
+ <span class="title">Helper</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>Class: FelFlame::Helper
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
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::Helper</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>component_manager.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Namespace for helper functions and template classes</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><h2>Defined Under Namespace</h2>
114
+ <p class="children">
115
+
116
+
117
+
118
+
119
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Helper/ComponentManager.html" title="FelFlame::Helper::ComponentManager (class)">ComponentManager</a></span>
120
+
121
+
122
+ </p>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ </div>
133
+
134
+ <div id="footer">
135
+ Generated on Wed Jul 7 12:27:30 2021 by
136
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
137
+ 0.9.26 (ruby-2.7.3).
138
+ </div>
139
+
140
+ </div>
141
+ </body>
142
+ </html>
@@ -0,0 +1,1627 @@
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
+ Class: FelFlame::Helper::ComponentManager
8
+
9
+ &mdash; 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 = "FelFlame::Helper::ComponentManager";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Helper.html" title="FelFlame::Helper (class)">Helper</a></span></span>
41
+ &raquo;
42
+ <span class="title">ComponentManager</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>Class: FelFlame::Helper::ComponentManager
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
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::Helper::ComponentManager</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>component_manager.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Component Managers are what is used to create individual components which can be attached to entities. When a Component is created from a Component Manager that has accessors given to it, you can set or get the values of those accessors using standard ruby message sending (e.g <tt>@component.var = 5</tt>), or by using the <span class='object_link'><a href="#attrs-instance_method" title="FelFlame::Helper::ComponentManager#attrs (method)">#attrs</a></span> and <span class='object_link'><a href="#update_attrs-instance_method" title="FelFlame::Helper::ComponentManager#update_attrs (method)">#update_attrs</a></span> methods instead.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#addition_triggers-class_method" title="addition_triggers (class method)">.<strong>addition_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+ <span class="note title readonly">readonly</span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>Stores references to systems that should be triggered when this component is added to an enitity.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#attr_triggers-class_method" title="attr_triggers (class method)">.<strong>attr_triggers</strong> &#x21d2; Hash&lt;Symbol, System&gt; </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+ <span class="note title readonly">readonly</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Stores references to systems that should be triggered when an attribute from this component changed.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#removal_triggers-class_method" title="removal_triggers (class method)">.<strong>removal_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+ <span class="note title readonly">readonly</span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>Stores references to systems that should be triggered when this component is removed from an enitity.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ </ul>
208
+
209
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
210
+ <ul class="summary">
211
+
212
+ <li class="public ">
213
+ <span class="summary_signature">
214
+
215
+ <a href="#addition_triggers-instance_method" title="#addition_triggers (instance method)">#<strong>addition_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
216
+
217
+
218
+
219
+ </span>
220
+
221
+
222
+
223
+
224
+ <span class="note title readonly">readonly</span>
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'>
235
+ <p>Stores references to systems that should be triggered when a component from this manager is added.</p>
236
+ </div></span>
237
+
238
+ </li>
239
+
240
+
241
+ <li class="public ">
242
+ <span class="summary_signature">
243
+
244
+ <a href="#attr_triggers-instance_method" title="#attr_triggers (instance method)">#<strong>attr_triggers</strong> &#x21d2; Hash&lt;Symbol, Array&lt;System&gt;&gt; </a>
245
+
246
+
247
+
248
+ </span>
249
+
250
+
251
+
252
+
253
+ <span class="note title readonly">readonly</span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <span class="summary_desc"><div class='inline'>
264
+ <p>Stores references to systems that should be triggered when an attribute from this manager is changed.</p>
265
+ </div></span>
266
+
267
+ </li>
268
+
269
+
270
+ <li class="public ">
271
+ <span class="summary_signature">
272
+
273
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Integer </a>
274
+
275
+
276
+
277
+ </span>
278
+
279
+
280
+
281
+
282
+ <span class="note title readonly">readonly</span>
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <span class="summary_desc"><div class='inline'>
293
+ <p>Holds the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span> of a component.</p>
294
+ </div></span>
295
+
296
+ </li>
297
+
298
+
299
+ <li class="public ">
300
+ <span class="summary_signature">
301
+
302
+ <a href="#removal_triggers-instance_method" title="#removal_triggers (instance method)">#<strong>removal_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
303
+
304
+
305
+
306
+ </span>
307
+
308
+
309
+
310
+
311
+ <span class="note title readonly">readonly</span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="summary_desc"><div class='inline'>
322
+ <p>Stores references to systems that should be triggered when a component from this manager is removed.</p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ </ul>
329
+
330
+
331
+
332
+
333
+
334
+ <h2>
335
+ Class Method Summary
336
+ <small><a href="#" class="summary_toggle">collapse</a></small>
337
+ </h2>
338
+
339
+ <ul class="summary">
340
+
341
+ <li class="public ">
342
+ <span class="summary_signature">
343
+
344
+ <a href="#[]-class_method" title="[] (class method)">.<strong>[]</strong>(component_id) &#x21d2; Component </a>
345
+
346
+
347
+
348
+ </span>
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+ <span class="summary_desc"><div class='inline'>
359
+ <p>Gets a Component from the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span>.</p>
360
+ </div></span>
361
+
362
+ </li>
363
+
364
+
365
+ <li class="public ">
366
+ <span class="summary_signature">
367
+
368
+ <a href="#each-class_method" title="each (class method)">.<strong>each</strong>(&amp;block) &#x21d2; Enumerator </a>
369
+
370
+
371
+
372
+ </span>
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+ <span class="summary_desc"><div class='inline'>
383
+ <p>Iterates over all components within the component manager.</p>
384
+ </div></span>
385
+
386
+ </li>
387
+
388
+
389
+ </ul>
390
+
391
+ <h2>
392
+ Instance Method Summary
393
+ <small><a href="#" class="summary_toggle">collapse</a></small>
394
+ </h2>
395
+
396
+ <ul class="summary">
397
+
398
+ <li class="public ">
399
+ <span class="summary_signature">
400
+
401
+ <a href="#attr_changed_trigger_systems-instance_method" title="#attr_changed_trigger_systems (instance method)">#<strong>attr_changed_trigger_systems</strong>(attr) &#x21d2; Boolean </a>
402
+
403
+
404
+
405
+ </span>
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+ <span class="summary_desc"><div class='inline'>
416
+ <p>Execute systems that have been added to execute on variable change.</p>
417
+ </div></span>
418
+
419
+ </li>
420
+
421
+
422
+ <li class="public ">
423
+ <span class="summary_signature">
424
+
425
+ <a href="#attrs-instance_method" title="#attrs (instance method)">#<strong>attrs</strong> &#x21d2; Hash&lt;Symbol, Value&gt; </a>
426
+
427
+
428
+
429
+ </span>
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+ <span class="summary_desc"><div class='inline'>
440
+ <p>A hash, where all the keys are attributes linked to their respective values.</p>
441
+ </div></span>
442
+
443
+ </li>
444
+
445
+
446
+ <li class="public ">
447
+ <span class="summary_signature">
448
+
449
+ <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong> &#x21d2; Boolean </a>
450
+
451
+
452
+
453
+ </span>
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+ <span class="summary_desc"><div class='inline'>
464
+ <p>Removes this component from the list and purges all references to this Component from other Entities, as well as its <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> and data.</p>
465
+ </div></span>
466
+
467
+ </li>
468
+
469
+
470
+ <li class="public ">
471
+ <span class="summary_signature">
472
+
473
+ <a href="#entities-instance_method" title="#entities (instance method)">#<strong>entities</strong> &#x21d2; Array&lt;Integer&gt; </a>
474
+
475
+
476
+
477
+ </span>
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+ <span class="summary_desc"><div class='inline'>
488
+ <p>A list of entity ids that are linked to the component.</p>
489
+ </div></span>
490
+
491
+ </li>
492
+
493
+
494
+ <li class="public ">
495
+ <span class="summary_signature">
496
+
497
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(**attrs) &#x21d2; Component </a>
498
+
499
+
500
+
501
+ </span>
502
+
503
+
504
+ <span class="note title constructor">constructor</span>
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+ <span class="summary_desc"><div class='inline'>
514
+ <p>Creates a new component and sets the values of the attributes given to it.</p>
515
+ </div></span>
516
+
517
+ </li>
518
+
519
+
520
+ <li class="public ">
521
+ <span class="summary_signature">
522
+
523
+ <a href="#to_i-instance_method" title="#to_i (instance method)">#<strong>to_i</strong> &#x21d2; Integer </a>
524
+
525
+
526
+
527
+ </span>
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ <span class="summary_desc"><div class='inline'>
538
+ <p>An alias for the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID Reader</a></span>.</p>
539
+ </div></span>
540
+
541
+ </li>
542
+
543
+
544
+ <li class="public ">
545
+ <span class="summary_signature">
546
+
547
+ <a href="#update_attrs-instance_method" title="#update_attrs (instance method)">#<strong>update_attrs</strong>(**opts) &#x21d2; Hash&lt;Symbol, Value&gt; </a>
548
+
549
+
550
+
551
+ </span>
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+ <span class="summary_desc"><div class='inline'>
562
+ <p>Update attribute values using a hash or keywords.</p>
563
+ </div></span>
564
+
565
+ </li>
566
+
567
+
568
+ </ul>
569
+
570
+
571
+ <div id="constructor_details" class="method_details_list">
572
+ <h2>Constructor Details</h2>
573
+
574
+ <div class="method_details first">
575
+ <h3 class="signature first" id="initialize-instance_method">
576
+
577
+ #<strong>initialize</strong>(**attrs) &#x21d2; <tt>Component</tt>
578
+
579
+
580
+
581
+
582
+
583
+ </h3><div class="docstring">
584
+ <div class="discussion">
585
+
586
+ <p>Creates a new component and sets the values of the attributes given to it. If an attritbute is not passed then it will remain as the default.</p>
587
+
588
+
589
+ </div>
590
+ </div>
591
+ <div class="tags">
592
+ <p class="tag_title">Parameters:</p>
593
+ <ul class="param">
594
+
595
+ <li>
596
+
597
+ <span class='name'>attrs</span>
598
+
599
+
600
+ <span class='type'>(<tt>Keyword: Value</tt>)</span>
601
+
602
+
603
+
604
+ &mdash;
605
+ <div class='inline'>
606
+ <p>You can pass any number of Keyword-Value pairs</p>
607
+ </div>
608
+
609
+ </li>
610
+
611
+ </ul>
612
+
613
+
614
+ </div><table class="source_code">
615
+ <tr>
616
+ <td>
617
+ <pre class="lines">
618
+
619
+
620
+ 104
621
+ 105
622
+ 106
623
+ 107
624
+ 108
625
+ 109
626
+ 110
627
+ 111
628
+ 112
629
+ 113
630
+ 114
631
+ 115
632
+ 116
633
+ 117
634
+ 118
635
+ 119
636
+ 120
637
+ 121
638
+ 122</pre>
639
+ </td>
640
+ <td>
641
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 104</span>
642
+
643
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span>
644
+ <span class='comment'># Prepare the object
645
+ </span> <span class='comment'># (this is a function created with metaprogramming
646
+ </span> <span class='comment'># in FelFlame::Components
647
+ </span> <span class='id identifier rubyid_set_defaults'>set_defaults</span>
648
+
649
+ <span class='comment'># Generate ID
650
+ </span> <span class='id identifier rubyid_new_id'>new_id</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_find_index'>find_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
651
+ <span class='id identifier rubyid_new_id'>new_id</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='kw'>if</span> <span class='id identifier rubyid_new_id'>new_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
652
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_new_id'>new_id</span>
653
+
654
+ <span class='comment'># Fill params
655
+ </span> <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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
656
+ <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
657
+ <span class='kw'>end</span>
658
+
659
+ <span class='comment'># Save Component
660
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_new_id'>new_id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span>
661
+ <span class='kw'>end</span></pre>
662
+ </td>
663
+ </tr>
664
+ </table>
665
+ </div>
666
+
667
+ </div>
668
+
669
+ <div id="class_attr_details" class="attr_details">
670
+ <h2>Class Attribute Details</h2>
671
+
672
+
673
+ <span id="addition_triggers=-class_method"></span>
674
+ <div class="method_details first">
675
+ <h3 class="signature first" id="addition_triggers-class_method">
676
+
677
+ .<strong>addition_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
678
+
679
+
680
+
681
+
682
+
683
+ </h3><div class="docstring">
684
+ <div class="discussion">
685
+
686
+ <p>Stores references to systems that should be triggered when this component is added to an enitity. Do not edit this array as it is managed by FelFlame automatically.</p>
687
+
688
+
689
+ </div>
690
+ </div>
691
+ <div class="tags">
692
+
693
+ <p class="tag_title">Returns:</p>
694
+ <ul class="return">
695
+
696
+ <li>
697
+
698
+
699
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
700
+
701
+
702
+
703
+ </li>
704
+
705
+ </ul>
706
+
707
+ </div><table class="source_code">
708
+ <tr>
709
+ <td>
710
+ <pre class="lines">
711
+
712
+
713
+ 136
714
+ 137
715
+ 138</pre>
716
+ </td>
717
+ <td>
718
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 136</span>
719
+
720
+ <span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span>
721
+ <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
722
+ <span class='kw'>end</span></pre>
723
+ </td>
724
+ </tr>
725
+ </table>
726
+ </div>
727
+
728
+
729
+ <span id="attr_triggers=-class_method"></span>
730
+ <div class="method_details ">
731
+ <h3 class="signature " id="attr_triggers-class_method">
732
+
733
+ .<strong>attr_triggers</strong> &#x21d2; <tt>Hash&lt;Symbol, System&gt;</tt>
734
+
735
+
736
+
737
+
738
+
739
+ </h3><div class="docstring">
740
+ <div class="discussion">
741
+
742
+ <p>Stores references to systems that should be triggered when an attribute from this component changed. Do not edit this hash as it is managed by FelFlame automatically.</p>
743
+
744
+
745
+ </div>
746
+ </div>
747
+ <div class="tags">
748
+
749
+ <p class="tag_title">Returns:</p>
750
+ <ul class="return">
751
+
752
+ <li>
753
+
754
+
755
+ <span class='type'>(<tt>Hash&lt;Symbol, System&gt;</tt>)</span>
756
+
757
+
758
+
759
+ </li>
760
+
761
+ </ul>
762
+
763
+ </div><table class="source_code">
764
+ <tr>
765
+ <td>
766
+ <pre class="lines">
767
+
768
+
769
+ 152
770
+ 153
771
+ 154</pre>
772
+ </td>
773
+ <td>
774
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 152</span>
775
+
776
+ <span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span>
777
+ <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
778
+ <span class='kw'>end</span></pre>
779
+ </td>
780
+ </tr>
781
+ </table>
782
+ </div>
783
+
784
+
785
+ <span id="removal_triggers=-class_method"></span>
786
+ <div class="method_details ">
787
+ <h3 class="signature " id="removal_triggers-class_method">
788
+
789
+ .<strong>removal_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
790
+
791
+
792
+
793
+
794
+
795
+ </h3><div class="docstring">
796
+ <div class="discussion">
797
+
798
+ <p>Stores references to systems that should be triggered when this component is removed from an enitity. Do not edit this array as it is managed by FelFlame automatically.</p>
799
+
800
+
801
+ </div>
802
+ </div>
803
+ <div class="tags">
804
+
805
+ <p class="tag_title">Returns:</p>
806
+ <ul class="return">
807
+
808
+ <li>
809
+
810
+
811
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
812
+
813
+
814
+
815
+ </li>
816
+
817
+ </ul>
818
+
819
+ </div><table class="source_code">
820
+ <tr>
821
+ <td>
822
+ <pre class="lines">
823
+
824
+
825
+ 144
826
+ 145
827
+ 146</pre>
828
+ </td>
829
+ <td>
830
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 144</span>
831
+
832
+ <span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span>
833
+ <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
834
+ <span class='kw'>end</span></pre>
835
+ </td>
836
+ </tr>
837
+ </table>
838
+ </div>
839
+
840
+ </div>
841
+
842
+ <div id="instance_attr_details" class="attr_details">
843
+ <h2>Instance Attribute Details</h2>
844
+
845
+
846
+ <span id="addition_triggers=-instance_method"></span>
847
+ <div class="method_details first">
848
+ <h3 class="signature first" id="addition_triggers-instance_method">
849
+
850
+ #<strong>addition_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
851
+
852
+
853
+
854
+
855
+
856
+ </h3><div class="docstring">
857
+ <div class="discussion">
858
+
859
+ <p>Stores references to systems that should be triggered when a component from this manager is added. Do not edit this array as it is managed by FelFlame automatically.</p>
860
+
861
+
862
+ </div>
863
+ </div>
864
+ <div class="tags">
865
+
866
+ <p class="tag_title">Returns:</p>
867
+ <ul class="return">
868
+
869
+ <li>
870
+
871
+
872
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
873
+
874
+
875
+
876
+ </li>
877
+
878
+ </ul>
879
+
880
+ </div><table class="source_code">
881
+ <tr>
882
+ <td>
883
+ <pre class="lines">
884
+
885
+
886
+ 81
887
+ 82
888
+ 83</pre>
889
+ </td>
890
+ <td>
891
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 81</span>
892
+
893
+ <span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span>
894
+ <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
895
+ <span class='kw'>end</span></pre>
896
+ </td>
897
+ </tr>
898
+ </table>
899
+ </div>
900
+
901
+
902
+ <span id="attr_triggers=-instance_method"></span>
903
+ <div class="method_details ">
904
+ <h3 class="signature " id="attr_triggers-instance_method">
905
+
906
+ #<strong>attr_triggers</strong> &#x21d2; <tt>Hash&lt;Symbol, Array&lt;System&gt;&gt;</tt>
907
+
908
+
909
+
910
+
911
+
912
+ </h3><div class="docstring">
913
+ <div class="discussion">
914
+
915
+ <p>Stores references to systems that should be triggered when an attribute from this manager is changed. Do not edit this hash as it is managed by FelFlame automatically.</p>
916
+
917
+
918
+ </div>
919
+ </div>
920
+ <div class="tags">
921
+
922
+ <p class="tag_title">Returns:</p>
923
+ <ul class="return">
924
+
925
+ <li>
926
+
927
+
928
+ <span class='type'>(<tt>Hash&lt;Symbol, Array&lt;System&gt;&gt;</tt>)</span>
929
+
930
+
931
+
932
+ </li>
933
+
934
+ </ul>
935
+
936
+ </div><table class="source_code">
937
+ <tr>
938
+ <td>
939
+ <pre class="lines">
940
+
941
+
942
+ 97
943
+ 98
944
+ 99</pre>
945
+ </td>
946
+ <td>
947
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 97</span>
948
+
949
+ <span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span>
950
+ <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
951
+ <span class='kw'>end</span></pre>
952
+ </td>
953
+ </tr>
954
+ </table>
955
+ </div>
956
+
957
+
958
+ <span id="id=-instance_method"></span>
959
+ <div class="method_details ">
960
+ <h3 class="signature " id="id-instance_method">
961
+
962
+ #<strong>id</strong> &#x21d2; <tt>Integer</tt>
963
+
964
+
965
+
966
+
967
+
968
+ </h3><div class="docstring">
969
+ <div class="discussion">
970
+
971
+ <p>Holds the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span> of a component. The <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> is only unique within the scope of the component manager it was created from.</p>
972
+
973
+
974
+ </div>
975
+ </div>
976
+ <div class="tags">
977
+
978
+ <p class="tag_title">Returns:</p>
979
+ <ul class="return">
980
+
981
+ <li>
982
+
983
+
984
+ <span class='type'>(<tt>Integer</tt>)</span>
985
+
986
+
987
+
988
+ </li>
989
+
990
+ </ul>
991
+
992
+ </div><table class="source_code">
993
+ <tr>
994
+ <td>
995
+ <pre class="lines">
996
+
997
+
998
+ 63
999
+ 64
1000
+ 65</pre>
1001
+ </td>
1002
+ <td>
1003
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 63</span>
1004
+
1005
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
1006
+ <span class='ivar'>@id</span>
1007
+ <span class='kw'>end</span></pre>
1008
+ </td>
1009
+ </tr>
1010
+ </table>
1011
+ </div>
1012
+
1013
+
1014
+ <span id="removal_triggers=-instance_method"></span>
1015
+ <div class="method_details ">
1016
+ <h3 class="signature " id="removal_triggers-instance_method">
1017
+
1018
+ #<strong>removal_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+ </h3><div class="docstring">
1025
+ <div class="discussion">
1026
+
1027
+ <p>Stores references to systems that should be triggered when a component from this manager is removed. Do not edit this array as it is managed by FelFlame automatically.</p>
1028
+
1029
+
1030
+ </div>
1031
+ </div>
1032
+ <div class="tags">
1033
+
1034
+ <p class="tag_title">Returns:</p>
1035
+ <ul class="return">
1036
+
1037
+ <li>
1038
+
1039
+
1040
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
1041
+
1042
+
1043
+
1044
+ </li>
1045
+
1046
+ </ul>
1047
+
1048
+ </div><table class="source_code">
1049
+ <tr>
1050
+ <td>
1051
+ <pre class="lines">
1052
+
1053
+
1054
+ 89
1055
+ 90
1056
+ 91</pre>
1057
+ </td>
1058
+ <td>
1059
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 89</span>
1060
+
1061
+ <span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span>
1062
+ <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1063
+ <span class='kw'>end</span></pre>
1064
+ </td>
1065
+ </tr>
1066
+ </table>
1067
+ </div>
1068
+
1069
+ </div>
1070
+
1071
+
1072
+ <div id="class_method_details" class="method_details_list">
1073
+ <h2>Class Method Details</h2>
1074
+
1075
+
1076
+ <div class="method_details first">
1077
+ <h3 class="signature first" id="[]-class_method">
1078
+
1079
+ .<strong>[]</strong>(component_id) &#x21d2; <tt>Component</tt>
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+ </h3><div class="docstring">
1086
+ <div class="discussion">
1087
+
1088
+ <p>Gets a Component from the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span>. Usage is simular to how an Array lookup works.</p>
1089
+
1090
+
1091
+ </div>
1092
+ </div>
1093
+ <div class="tags">
1094
+
1095
+ <div class="examples">
1096
+ <p class="tag_title">Examples:</p>
1097
+
1098
+
1099
+ <pre class="example code"><code><span class='comment'># this gets the &#39;Health&#39; Component with ID 7
1100
+ </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="../Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Health</span><span class='lbracket'>[</span><span class='int'>7</span><span class='rbracket'>]</span></code></pre>
1101
+
1102
+ </div>
1103
+ <p class="tag_title">Parameters:</p>
1104
+ <ul class="param">
1105
+
1106
+ <li>
1107
+
1108
+ <span class='name'>component_id</span>
1109
+
1110
+
1111
+ <span class='type'>(<tt>Integer</tt>)</span>
1112
+
1113
+
1114
+
1115
+ </li>
1116
+
1117
+ </ul>
1118
+
1119
+ <p class="tag_title">Returns:</p>
1120
+ <ul class="return">
1121
+
1122
+ <li>
1123
+
1124
+
1125
+ <span class='type'>(<tt>Component</tt>)</span>
1126
+
1127
+
1128
+
1129
+ &mdash;
1130
+ <div class='inline'>
1131
+ <p>Returns the Component that uses the given unique <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span>, nil if there is no Component associated with the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span></p>
1132
+ </div>
1133
+
1134
+ </li>
1135
+
1136
+ </ul>
1137
+
1138
+ </div><table class="source_code">
1139
+ <tr>
1140
+ <td>
1141
+ <pre class="lines">
1142
+
1143
+
1144
+ 169
1145
+ 170
1146
+ 171</pre>
1147
+ </td>
1148
+ <td>
1149
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 169</span>
1150
+
1151
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_component_id'>component_id</span><span class='rparen'>)</span>
1152
+ <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_id'>component_id</span><span class='rbracket'>]</span>
1153
+ <span class='kw'>end</span></pre>
1154
+ </td>
1155
+ </tr>
1156
+ </table>
1157
+ </div>
1158
+
1159
+ <div class="method_details ">
1160
+ <h3 class="signature " id="each-class_method">
1161
+
1162
+ .<strong>each</strong>(&amp;block) &#x21d2; <tt>Enumerator</tt>
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+ </h3><div class="docstring">
1169
+ <div class="discussion">
1170
+
1171
+ <p>Iterates over all components within the component manager. Special Enumerable methods like <code>map</code> or <code>each_with_index</code> are not implemented</p>
1172
+
1173
+
1174
+ </div>
1175
+ </div>
1176
+ <div class="tags">
1177
+
1178
+ <p class="tag_title">Returns:</p>
1179
+ <ul class="return">
1180
+
1181
+ <li>
1182
+
1183
+
1184
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1185
+
1186
+
1187
+
1188
+ </li>
1189
+
1190
+ </ul>
1191
+
1192
+ </div><table class="source_code">
1193
+ <tr>
1194
+ <td>
1195
+ <pre class="lines">
1196
+
1197
+
1198
+ 176
1199
+ 177
1200
+ 178</pre>
1201
+ </td>
1202
+ <td>
1203
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 176</span>
1204
+
1205
+ <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1206
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1207
+ <span class='kw'>end</span></pre>
1208
+ </td>
1209
+ </tr>
1210
+ </table>
1211
+ </div>
1212
+
1213
+ </div>
1214
+
1215
+ <div id="instance_method_details" class="method_details_list">
1216
+ <h2>Instance Method Details</h2>
1217
+
1218
+
1219
+ <div class="method_details first">
1220
+ <h3 class="signature first" id="attr_changed_trigger_systems-instance_method">
1221
+
1222
+ #<strong>attr_changed_trigger_systems</strong>(attr) &#x21d2; <tt>Boolean</tt>
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+ </h3><div class="docstring">
1229
+ <div class="discussion">
1230
+
1231
+ <p>Execute systems that have been added to execute on variable change</p>
1232
+
1233
+
1234
+ </div>
1235
+ </div>
1236
+ <div class="tags">
1237
+
1238
+ <p class="tag_title">Returns:</p>
1239
+ <ul class="return">
1240
+
1241
+ <li>
1242
+
1243
+
1244
+ <span class='type'>(<tt>Boolean</tt>)</span>
1245
+
1246
+
1247
+
1248
+ &mdash;
1249
+ <div class='inline'>
1250
+ <p><code>true</code></p>
1251
+ </div>
1252
+
1253
+ </li>
1254
+
1255
+ </ul>
1256
+
1257
+ </div><table class="source_code">
1258
+ <tr>
1259
+ <td>
1260
+ <pre class="lines">
1261
+
1262
+
1263
+ 203
1264
+ 204
1265
+ 205
1266
+ 206
1267
+ 207
1268
+ 208
1269
+ 209
1270
+ 210
1271
+ 211</pre>
1272
+ </td>
1273
+ <td>
1274
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 203</span>
1275
+
1276
+ <span class='kw'>def</span> <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>
1277
+ <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span>
1278
+ <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1279
+
1280
+ <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>|=</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1281
+
1282
+ <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:priority</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:call</span><span class='rparen'>)</span>
1283
+ <span class='kw'>true</span>
1284
+ <span class='kw'>end</span></pre>
1285
+ </td>
1286
+ </tr>
1287
+ </table>
1288
+ </div>
1289
+
1290
+ <div class="method_details ">
1291
+ <h3 class="signature " id="attrs-instance_method">
1292
+
1293
+ #<strong>attrs</strong> &#x21d2; <tt>Hash&lt;Symbol, Value&gt;</tt>
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+ </h3><div class="docstring">
1300
+ <div class="discussion">
1301
+
1302
+ <p>Returns A hash, where all the keys are attributes linked to their respective values.</p>
1303
+
1304
+
1305
+ </div>
1306
+ </div>
1307
+ <div class="tags">
1308
+
1309
+ <p class="tag_title">Returns:</p>
1310
+ <ul class="return">
1311
+
1312
+ <li>
1313
+
1314
+
1315
+ <span class='type'>(<tt>Hash&lt;Symbol, Value&gt;</tt>)</span>
1316
+
1317
+
1318
+
1319
+ &mdash;
1320
+ <div class='inline'>
1321
+ <p>A hash, where all the keys are attributes linked to their respective values.</p>
1322
+ </div>
1323
+
1324
+ </li>
1325
+
1326
+ </ul>
1327
+
1328
+ </div><table class="source_code">
1329
+ <tr>
1330
+ <td>
1331
+ <pre class="lines">
1332
+
1333
+
1334
+ 234
1335
+ 235
1336
+ 236
1337
+ 237
1338
+ 238
1339
+ 239
1340
+ 240</pre>
1341
+ </td>
1342
+ <td>
1343
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 234</span>
1344
+
1345
+ <span class='kw'>def</span> <span class='id identifier rubyid_attrs'>attrs</span>
1346
+ <span class='id identifier rubyid_return_hash'>return_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variables'>instance_variables</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_final'>final</span><span class='op'>|</span>
1347
+ <span class='id identifier rubyid_final'>final</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_delete_prefix'>delete_prefix</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>@</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1348
+ <span class='kw'>end</span>
1349
+ <span class='id identifier rubyid_return_hash'>return_hash</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:attr_triggers</span><span class='rparen'>)</span>
1350
+ <span class='id identifier rubyid_return_hash'>return_hash</span>
1351
+ <span class='kw'>end</span></pre>
1352
+ </td>
1353
+ </tr>
1354
+ </table>
1355
+ </div>
1356
+
1357
+ <div class="method_details ">
1358
+ <h3 class="signature " id="delete-instance_method">
1359
+
1360
+ #<strong>delete</strong> &#x21d2; <tt>Boolean</tt>
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+ </h3><div class="docstring">
1367
+ <div class="discussion">
1368
+
1369
+ <p>Removes this component from the list and purges all references to this Component from other Entities, as well as its <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> and data.</p>
1370
+
1371
+
1372
+ </div>
1373
+ </div>
1374
+ <div class="tags">
1375
+
1376
+ <p class="tag_title">Returns:</p>
1377
+ <ul class="return">
1378
+
1379
+ <li>
1380
+
1381
+
1382
+ <span class='type'>(<tt>Boolean</tt>)</span>
1383
+
1384
+
1385
+
1386
+ &mdash;
1387
+ <div class='inline'>
1388
+ <p><code>true</code>.</p>
1389
+ </div>
1390
+
1391
+ </li>
1392
+
1393
+ </ul>
1394
+
1395
+ </div><table class="source_code">
1396
+ <tr>
1397
+ <td>
1398
+ <pre class="lines">
1399
+
1400
+
1401
+ 215
1402
+ 216
1403
+ 217
1404
+ 218
1405
+ 219
1406
+ 220
1407
+ 221
1408
+ 222
1409
+ 223
1410
+ 224
1411
+ 225
1412
+ 226
1413
+ 227
1414
+ 228
1415
+ 229
1416
+ 230
1417
+ 231</pre>
1418
+ </td>
1419
+ <td>
1420
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 215</span>
1421
+
1422
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
1423
+ <span class='id identifier rubyid_addition_triggers'>addition_triggers</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_system'>system</span><span class='op'>|</span>
1424
+ <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='label'>component_or_manager:</span> <span class='kw'>self</span>
1425
+ <span class='kw'>end</span>
1426
+ <span class='comment'># This needs to be cloned because indices get deleted as
1427
+ </span> <span class='comment'># the remove command is called, breaking the loop if it
1428
+ </span> <span class='comment'># wasn&#39;t referencing a clone(will get Nil errors)
1429
+ </span> <span class='id identifier rubyid_iter'>iter</span> <span class='op'>=</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:clone</span><span class='rparen'>)</span>
1430
+ <span class='id identifier rubyid_iter'>iter</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_entity_id'>entity_id</span><span class='op'>|</span>
1431
+ <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="../Entities.html" title="FelFlame::Entities (class)">Entities</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_entity_id'>entity_id</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span> <span class='kw'>self</span> <span class='comment'>#unless FelFlame::Entities[entity_id].nil?
1432
+ </span> <span class='kw'>end</span>
1433
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
1434
+ <span class='id identifier rubyid_instance_variables'>instance_variables</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_var'>var</span><span class='op'>|</span>
1435
+ <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1436
+ <span class='kw'>end</span>
1437
+ <span class='kw'>true</span>
1438
+ <span class='kw'>end</span></pre>
1439
+ </td>
1440
+ </tr>
1441
+ </table>
1442
+ </div>
1443
+
1444
+ <div class="method_details ">
1445
+ <h3 class="signature " id="entities-instance_method">
1446
+
1447
+ #<strong>entities</strong> &#x21d2; <tt>Array&lt;Integer&gt;</tt>
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+ </h3><div class="docstring">
1454
+ <div class="discussion">
1455
+
1456
+ <p>A list of entity ids that are linked to the component</p>
1457
+
1458
+
1459
+ </div>
1460
+ </div>
1461
+ <div class="tags">
1462
+
1463
+ <p class="tag_title">Returns:</p>
1464
+ <ul class="return">
1465
+
1466
+ <li>
1467
+
1468
+
1469
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
1470
+
1471
+
1472
+
1473
+ </li>
1474
+
1475
+ </ul>
1476
+
1477
+ </div><table class="source_code">
1478
+ <tr>
1479
+ <td>
1480
+ <pre class="lines">
1481
+
1482
+
1483
+ 189
1484
+ 190
1485
+ 191</pre>
1486
+ </td>
1487
+ <td>
1488
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 189</span>
1489
+
1490
+ <span class='kw'>def</span> <span class='id identifier rubyid_entities'>entities</span>
1491
+ <span class='ivar'>@entities</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1492
+ <span class='kw'>end</span></pre>
1493
+ </td>
1494
+ </tr>
1495
+ </table>
1496
+ </div>
1497
+
1498
+ <div class="method_details ">
1499
+ <h3 class="signature " id="to_i-instance_method">
1500
+
1501
+ #<strong>to_i</strong> &#x21d2; <tt>Integer</tt>
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+ </h3><div class="docstring">
1508
+ <div class="discussion">
1509
+
1510
+ <p>An alias for the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID Reader</a></span></p>
1511
+
1512
+
1513
+ </div>
1514
+ </div>
1515
+ <div class="tags">
1516
+
1517
+ <p class="tag_title">Returns:</p>
1518
+ <ul class="return">
1519
+
1520
+ <li>
1521
+
1522
+
1523
+ <span class='type'>(<tt>Integer</tt>)</span>
1524
+
1525
+
1526
+
1527
+ </li>
1528
+
1529
+ </ul>
1530
+
1531
+ </div><table class="source_code">
1532
+ <tr>
1533
+ <td>
1534
+ <pre class="lines">
1535
+
1536
+
1537
+ 183
1538
+ 184
1539
+ 185</pre>
1540
+ </td>
1541
+ <td>
1542
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 183</span>
1543
+
1544
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_i'>to_i</span>
1545
+ <span class='id identifier rubyid_id'>id</span>
1546
+ <span class='kw'>end</span></pre>
1547
+ </td>
1548
+ </tr>
1549
+ </table>
1550
+ </div>
1551
+
1552
+ <div class="method_details ">
1553
+ <h3 class="signature " id="update_attrs-instance_method">
1554
+
1555
+ #<strong>update_attrs</strong>(**opts) &#x21d2; <tt>Hash&lt;Symbol, Value&gt;</tt>
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+ </h3><div class="docstring">
1562
+ <div class="discussion">
1563
+
1564
+ <p>Update attribute values using a hash or keywords.</p>
1565
+
1566
+
1567
+ </div>
1568
+ </div>
1569
+ <div class="tags">
1570
+
1571
+ <p class="tag_title">Returns:</p>
1572
+ <ul class="return">
1573
+
1574
+ <li>
1575
+
1576
+
1577
+ <span class='type'>(<tt>Hash&lt;Symbol, Value&gt;</tt>)</span>
1578
+
1579
+
1580
+
1581
+ &mdash;
1582
+ <div class='inline'>
1583
+ <p>Hash of updated attributes</p>
1584
+ </div>
1585
+
1586
+ </li>
1587
+
1588
+ </ul>
1589
+
1590
+ </div><table class="source_code">
1591
+ <tr>
1592
+ <td>
1593
+ <pre class="lines">
1594
+
1595
+
1596
+ 195
1597
+ 196
1598
+ 197
1599
+ 198
1600
+ 199</pre>
1601
+ </td>
1602
+ <td>
1603
+ <pre class="code"><span class="info file"># File 'component_manager.rb', line 195</span>
1604
+
1605
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
1606
+ <span class='id identifier rubyid_opts'>opts</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
1607
+ <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
1608
+ <span class='kw'>end</span>
1609
+ <span class='kw'>end</span></pre>
1610
+ </td>
1611
+ </tr>
1612
+ </table>
1613
+ </div>
1614
+
1615
+ </div>
1616
+
1617
+ </div>
1618
+
1619
+ <div id="footer">
1620
+ Generated on Wed Jul 7 12:27:30 2021 by
1621
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1622
+ 0.9.26 (ruby-2.7.3).
1623
+ </div>
1624
+
1625
+ </div>
1626
+ </body>
1627
+ </html>