kawaii 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/.DS_Store +0 -0
  2. data/.gitignore +2 -0
  3. data/.yardoc/checksums +19 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/Gemfile +3 -0
  8. data/Gemfile.lock +28 -0
  9. data/LICENSE +22 -0
  10. data/README.md +46 -0
  11. data/Rakefile +2 -0
  12. data/backlog.md +26 -0
  13. data/bin/kawaii +13 -0
  14. data/doc/Kawaii/Animation.html +120 -0
  15. data/doc/Kawaii/AudioManager.html +202 -0
  16. data/doc/Kawaii/ContentManager.html +487 -0
  17. data/doc/Kawaii/Entity.html +604 -0
  18. data/doc/Kawaii/Game.html +1141 -0
  19. data/doc/Kawaii/InputManager.html +120 -0
  20. data/doc/Kawaii/Intro.html +120 -0
  21. data/doc/Kawaii/Math.html +105 -0
  22. data/doc/Kawaii/Node.html +1030 -0
  23. data/doc/Kawaii/NodeManager.html +512 -0
  24. data/doc/Kawaii/Scene.html +120 -0
  25. data/doc/Kawaii/SceneManager.html +200 -0
  26. data/doc/Kawaii/TextField.html +538 -0
  27. data/doc/Kawaii/TmxLayer.html +836 -0
  28. data/doc/Kawaii/TmxTileMap.html +972 -0
  29. data/doc/Kawaii/Tweening.html +120 -0
  30. data/doc/Kawaii/UnsupportedFormatError.html +123 -0
  31. data/doc/Kawaii/Vector2.html +514 -0
  32. data/doc/Kawaii.html +136 -0
  33. data/doc/_index.html +327 -0
  34. data/doc/class_list.html +53 -0
  35. data/doc/css/common.css +1 -0
  36. data/doc/css/full_list.css +57 -0
  37. data/doc/css/style.css +328 -0
  38. data/doc/file.README.html +130 -0
  39. data/doc/file_list.html +55 -0
  40. data/doc/frames.html +28 -0
  41. data/doc/index.html +130 -0
  42. data/doc/js/app.js +214 -0
  43. data/doc/js/full_list.js +173 -0
  44. data/doc/js/jquery.js +4 -0
  45. data/doc/method_list.html +708 -0
  46. data/doc/top-level-namespace.html +112 -0
  47. data/kawaii.gemspec +27 -0
  48. data/lib/kawaii/animation.rb +4 -0
  49. data/lib/kawaii/audio_manager.rb +7 -0
  50. data/lib/kawaii/command.rb +96 -0
  51. data/lib/kawaii/constants.rb +5 -0
  52. data/lib/kawaii/content_manager.rb +34 -0
  53. data/lib/kawaii/entity.rb +25 -0
  54. data/lib/kawaii/errors.rb +6 -0
  55. data/lib/kawaii/game.rb +89 -0
  56. data/lib/kawaii/helpers.rb +22 -0
  57. data/lib/kawaii/input_manager.rb +51 -0
  58. data/lib/kawaii/intro.rb +4 -0
  59. data/lib/kawaii/math.rb +5 -0
  60. data/lib/kawaii/node.rb +62 -0
  61. data/lib/kawaii/node_manager.rb +35 -0
  62. data/lib/kawaii/physics_entity.rb +32 -0
  63. data/lib/kawaii/physics_manager.rb +27 -0
  64. data/lib/kawaii/scene.rb +21 -0
  65. data/lib/kawaii/scene_manager.rb +50 -0
  66. data/lib/kawaii/text_field.rb +22 -0
  67. data/lib/kawaii/tmx_layer.rb +44 -0
  68. data/lib/kawaii/tmx_tile_map.rb +70 -0
  69. data/lib/kawaii/tweening.rb +4 -0
  70. data/lib/kawaii/vector2.rb +26 -0
  71. data/lib/kawaii/version.rb +3 -0
  72. data/lib/kawaii.rb +22 -0
  73. data/samples/.DS_Store +0 -0
  74. data/samples/content/gfx/ball.png +0 -0
  75. data/samples/content/maps/test_map.json +39 -0
  76. data/samples/content/maps/test_map.xml +12 -0
  77. data/samples/sample.rb +25 -0
  78. data/samples/sample_1/.DS_Store +0 -0
  79. data/samples/sample_1/content/gfx/ball.png +0 -0
  80. data/samples/sample_1/content/gfx/map1.png +0 -0
  81. data/samples/sample_1/content/maps/map1.json +50 -0
  82. data/samples/sample_1/content/maps/map1.tmx +16 -0
  83. data/samples/sample_1/content/maps/test_map.json +39 -0
  84. data/samples/sample_1/content/maps/test_map.xml +12 -0
  85. data/samples/sample_1/enemy.rb +11 -0
  86. data/samples/sample_1/sample_game.rb +51 -0
  87. data/samples/sample_chipmunk/sample.rb +0 -0
  88. data/spec/kawaii/audio_manager_spec.rb +9 -0
  89. data/spec/kawaii/content/gfx/ball.png +0 -0
  90. data/spec/kawaii/content/maps/test_map.json +39 -0
  91. data/spec/kawaii/content/maps/test_map.xml +12 -0
  92. data/spec/kawaii/content_manager_spec.rb +33 -0
  93. data/spec/kawaii/entity_spec.rb +38 -0
  94. data/spec/kawaii/game_spec.rb +23 -0
  95. data/spec/kawaii/helpers_spec.rb +31 -0
  96. data/spec/kawaii/input_manager_spec.rb +29 -0
  97. data/spec/kawaii/node_manager_spec.rb +36 -0
  98. data/spec/kawaii/node_spec.rb +81 -0
  99. data/spec/kawaii/physics_entity_spec.rb +37 -0
  100. data/spec/kawaii/physics_manager_spec.rb +45 -0
  101. data/spec/kawaii/scene_manager_spec.rb +34 -0
  102. data/spec/kawaii/scene_spec.rb +31 -0
  103. data/spec/kawaii/text_field_spec.rb +17 -0
  104. data/spec/kawaii/tmx_layer_spec.rb +21 -0
  105. data/spec/kawaii/tmx_tile_map_spec.rb +38 -0
  106. data/spec/kawaii/vector2_spec.rb +34 -0
  107. data/spec/spec_helper.rb +1 -0
  108. metadata +205 -0
@@ -0,0 +1,1030 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Kawaii::Node
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (N)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Kawaii.html" title="Kawaii (module)">Kawaii</a></span></span>
36
+ &raquo;
37
+ <span class="title">Node</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Kawaii::Node
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Kawaii::Node</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/kawaii/node.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <div id="subclasses">
103
+ <h2>Direct Known Subclasses</h2>
104
+ <p class="children"><span class='object_link'><a href="Entity.html" title="Kawaii::Entity (class)">Entity</a></span></p>
105
+ </div>
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#children-instance_method" title="#children (instance method)">- (Object) <strong>children</strong> </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'>
134
+ <p>Returns the value of attribute children.</p>
135
+ </div></span>
136
+
137
+ </li>
138
+
139
+
140
+ <li class="public ">
141
+ <span class="summary_signature">
142
+
143
+ <a href="#gravity-instance_method" title="#gravity (instance method)">- (Object) <strong>gravity</strong> </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'>
161
+ <p>Returns the value of attribute gravity.</p>
162
+ </div></span>
163
+
164
+ </li>
165
+
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#position-instance_method" title="#position (instance method)">- (Object) <strong>position</strong> </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>Returns the value of attribute position.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#rotation-instance_method" title="#rotation (instance method)">- (Object) <strong>rotation</strong> </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'>
215
+ <p>Returns the value of attribute rotation.</p>
216
+ </div></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#static-instance_method" title="#static (instance method)">- (Object) <strong>static</strong> </a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'>
242
+ <p>Returns the value of attribute static.</p>
243
+ </div></span>
244
+
245
+ </li>
246
+
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#velocity-instance_method" title="#velocity (instance method)">- (Object) <strong>velocity</strong> </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'>
269
+ <p>Returns the value of attribute velocity.</p>
270
+ </div></span>
271
+
272
+ </li>
273
+
274
+
275
+ </ul>
276
+
277
+
278
+
279
+
280
+
281
+ <h2>
282
+ Instance Method Summary
283
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
284
+ </h2>
285
+
286
+ <ul class="summary">
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#add_child-instance_method" title="#add_child (instance method)">- (Object) <strong>add_child</strong>(node) </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <span class="summary_desc"><div class='inline'></div></span>
306
+
307
+ </li>
308
+
309
+
310
+ <li class="public ">
311
+ <span class="summary_signature">
312
+
313
+ <a href="#count-instance_method" title="#count (instance method)">- (Object) <strong>count</strong> </a>
314
+
315
+
316
+
317
+ </span>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <span class="summary_desc"><div class='inline'></div></span>
328
+
329
+ </li>
330
+
331
+
332
+ <li class="public ">
333
+ <span class="summary_signature">
334
+
335
+ <a href="#draw-instance_method" title="#draw (instance method)">- (Object) <strong>draw</strong> </a>
336
+
337
+
338
+
339
+ </span>
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'></div></span>
350
+
351
+ </li>
352
+
353
+
354
+ <li class="public ">
355
+ <span class="summary_signature">
356
+
357
+ <a href="#has_children%3F-instance_method" title="#has_children? (instance method)">- (Boolean) <strong>has_children?</strong> </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <span class="summary_desc"><div class='inline'></div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Node) <strong>initialize</strong>(static = false, position = Vector2.new, velocity = Vector2.new, gravity = Kawaii::Vector2.new(0, Kawaii::GRAVITY)) </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+ <span class="note title constructor">constructor</span>
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+ <span class="summary_desc"><div class='inline'>
396
+ <p>A new instance of Node.</p>
397
+ </div></span>
398
+
399
+ </li>
400
+
401
+
402
+ <li class="public ">
403
+ <span class="summary_signature">
404
+
405
+ <a href="#remove_child-instance_method" title="#remove_child (instance method)">- (Object) <strong>remove_child</strong>(node) </a>
406
+
407
+
408
+
409
+ </span>
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+ <span class="summary_desc"><div class='inline'></div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
427
+ <a href="#update-instance_method" title="#update (instance method)">- (Object) <strong>update</strong>(dt) </a>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+ <span class="summary_desc"><div class='inline'></div></span>
442
+
443
+ </li>
444
+
445
+
446
+ </ul>
447
+
448
+
449
+ <div id="constructor_details" class="method_details_list">
450
+ <h2>Constructor Details</h2>
451
+
452
+ <div class="method_details first">
453
+ <h3 class="signature first" id="initialize-instance_method">
454
+
455
+ - (<tt><span class='object_link'><a href="" title="Kawaii::Node (class)">Node</a></span></tt>) <strong>initialize</strong>(static = false, position = Vector2.new, velocity = Vector2.new, gravity = Kawaii::Vector2.new(0, Kawaii::GRAVITY))
456
+
457
+
458
+
459
+
460
+
461
+ </h3><div class="docstring">
462
+ <div class="discussion">
463
+
464
+ <p>A new instance of Node</p>
465
+
466
+
467
+ </div>
468
+ </div>
469
+ <div class="tags">
470
+
471
+
472
+ </div><table class="source_code">
473
+ <tr>
474
+ <td>
475
+ <pre class="lines">
476
+
477
+
478
+ 6
479
+ 7
480
+ 8
481
+ 9
482
+ 10
483
+ 11
484
+ 12
485
+ 13</pre>
486
+ </td>
487
+ <td>
488
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 6</span>
489
+
490
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_static'>static</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_position'>position</span> <span class='op'>=</span> <span class='const'>Vector2</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='id identifier rubyid_velocity'>velocity</span> <span class='op'>=</span> <span class='const'>Vector2</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='id identifier rubyid_gravity'>gravity</span> <span class='op'>=</span> <span class='const'>Kawaii</span><span class='op'>::</span><span class='const'>Vector2</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='const'>Kawaii</span><span class='op'>::</span><span class='const'>GRAVITY</span><span class='rparen'>)</span>
491
+ <span class='ivar'>@children</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
492
+ <span class='ivar'>@rotation</span> <span class='op'>=</span> <span class='float'>0.0</span>
493
+ <span class='ivar'>@position</span> <span class='op'>=</span> <span class='id identifier rubyid_position'>position</span>
494
+ <span class='ivar'>@velocity</span> <span class='op'>=</span> <span class='id identifier rubyid_velocity'>velocity</span>
495
+ <span class='ivar'>@gravity</span> <span class='op'>=</span> <span class='id identifier rubyid_gravity'>gravity</span>
496
+ <span class='ivar'>@static</span> <span class='op'>=</span> <span class='id identifier rubyid_static'>static</span>
497
+ <span class='kw'>end</span></pre>
498
+ </td>
499
+ </tr>
500
+ </table>
501
+ </div>
502
+
503
+ </div>
504
+
505
+ <div id="instance_attr_details" class="attr_details">
506
+ <h2>Instance Attribute Details</h2>
507
+
508
+
509
+ <span id="children=-instance_method"></span>
510
+ <div class="method_details first">
511
+ <h3 class="signature first" id="children-instance_method">
512
+
513
+ - (<tt>Object</tt>) <strong>children</strong>
514
+
515
+
516
+
517
+
518
+
519
+ </h3><div class="docstring">
520
+ <div class="discussion">
521
+
522
+ <p>Returns the value of attribute children</p>
523
+
524
+
525
+ </div>
526
+ </div>
527
+ <div class="tags">
528
+
529
+
530
+ </div><table class="source_code">
531
+ <tr>
532
+ <td>
533
+ <pre class="lines">
534
+
535
+
536
+ 4
537
+ 5
538
+ 6</pre>
539
+ </td>
540
+ <td>
541
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
542
+
543
+ <span class='kw'>def</span> <span class='id identifier rubyid_children'>children</span>
544
+ <span class='ivar'>@children</span>
545
+ <span class='kw'>end</span></pre>
546
+ </td>
547
+ </tr>
548
+ </table>
549
+ </div>
550
+
551
+
552
+ <span id="gravity=-instance_method"></span>
553
+ <div class="method_details ">
554
+ <h3 class="signature " id="gravity-instance_method">
555
+
556
+ - (<tt>Object</tt>) <strong>gravity</strong>
557
+
558
+
559
+
560
+
561
+
562
+ </h3><div class="docstring">
563
+ <div class="discussion">
564
+
565
+ <p>Returns the value of attribute gravity</p>
566
+
567
+
568
+ </div>
569
+ </div>
570
+ <div class="tags">
571
+
572
+
573
+ </div><table class="source_code">
574
+ <tr>
575
+ <td>
576
+ <pre class="lines">
577
+
578
+
579
+ 4
580
+ 5
581
+ 6</pre>
582
+ </td>
583
+ <td>
584
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
585
+
586
+ <span class='kw'>def</span> <span class='id identifier rubyid_gravity'>gravity</span>
587
+ <span class='ivar'>@gravity</span>
588
+ <span class='kw'>end</span></pre>
589
+ </td>
590
+ </tr>
591
+ </table>
592
+ </div>
593
+
594
+
595
+ <span id="position=-instance_method"></span>
596
+ <div class="method_details ">
597
+ <h3 class="signature " id="position-instance_method">
598
+
599
+ - (<tt>Object</tt>) <strong>position</strong>
600
+
601
+
602
+
603
+
604
+
605
+ </h3><div class="docstring">
606
+ <div class="discussion">
607
+
608
+ <p>Returns the value of attribute position</p>
609
+
610
+
611
+ </div>
612
+ </div>
613
+ <div class="tags">
614
+
615
+
616
+ </div><table class="source_code">
617
+ <tr>
618
+ <td>
619
+ <pre class="lines">
620
+
621
+
622
+ 4
623
+ 5
624
+ 6</pre>
625
+ </td>
626
+ <td>
627
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
628
+
629
+ <span class='kw'>def</span> <span class='id identifier rubyid_position'>position</span>
630
+ <span class='ivar'>@position</span>
631
+ <span class='kw'>end</span></pre>
632
+ </td>
633
+ </tr>
634
+ </table>
635
+ </div>
636
+
637
+
638
+ <span id="rotation=-instance_method"></span>
639
+ <div class="method_details ">
640
+ <h3 class="signature " id="rotation-instance_method">
641
+
642
+ - (<tt>Object</tt>) <strong>rotation</strong>
643
+
644
+
645
+
646
+
647
+
648
+ </h3><div class="docstring">
649
+ <div class="discussion">
650
+
651
+ <p>Returns the value of attribute rotation</p>
652
+
653
+
654
+ </div>
655
+ </div>
656
+ <div class="tags">
657
+
658
+
659
+ </div><table class="source_code">
660
+ <tr>
661
+ <td>
662
+ <pre class="lines">
663
+
664
+
665
+ 4
666
+ 5
667
+ 6</pre>
668
+ </td>
669
+ <td>
670
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
671
+
672
+ <span class='kw'>def</span> <span class='id identifier rubyid_rotation'>rotation</span>
673
+ <span class='ivar'>@rotation</span>
674
+ <span class='kw'>end</span></pre>
675
+ </td>
676
+ </tr>
677
+ </table>
678
+ </div>
679
+
680
+
681
+ <span id="static=-instance_method"></span>
682
+ <div class="method_details ">
683
+ <h3 class="signature " id="static-instance_method">
684
+
685
+ - (<tt>Object</tt>) <strong>static</strong>
686
+
687
+
688
+
689
+
690
+
691
+ </h3><div class="docstring">
692
+ <div class="discussion">
693
+
694
+ <p>Returns the value of attribute static</p>
695
+
696
+
697
+ </div>
698
+ </div>
699
+ <div class="tags">
700
+
701
+
702
+ </div><table class="source_code">
703
+ <tr>
704
+ <td>
705
+ <pre class="lines">
706
+
707
+
708
+ 4
709
+ 5
710
+ 6</pre>
711
+ </td>
712
+ <td>
713
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
714
+
715
+ <span class='kw'>def</span> <span class='id identifier rubyid_static'>static</span>
716
+ <span class='ivar'>@static</span>
717
+ <span class='kw'>end</span></pre>
718
+ </td>
719
+ </tr>
720
+ </table>
721
+ </div>
722
+
723
+
724
+ <span id="velocity=-instance_method"></span>
725
+ <div class="method_details ">
726
+ <h3 class="signature " id="velocity-instance_method">
727
+
728
+ - (<tt>Object</tt>) <strong>velocity</strong>
729
+
730
+
731
+
732
+
733
+
734
+ </h3><div class="docstring">
735
+ <div class="discussion">
736
+
737
+ <p>Returns the value of attribute velocity</p>
738
+
739
+
740
+ </div>
741
+ </div>
742
+ <div class="tags">
743
+
744
+
745
+ </div><table class="source_code">
746
+ <tr>
747
+ <td>
748
+ <pre class="lines">
749
+
750
+
751
+ 4
752
+ 5
753
+ 6</pre>
754
+ </td>
755
+ <td>
756
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 4</span>
757
+
758
+ <span class='kw'>def</span> <span class='id identifier rubyid_velocity'>velocity</span>
759
+ <span class='ivar'>@velocity</span>
760
+ <span class='kw'>end</span></pre>
761
+ </td>
762
+ </tr>
763
+ </table>
764
+ </div>
765
+
766
+ </div>
767
+
768
+
769
+ <div id="instance_method_details" class="method_details_list">
770
+ <h2>Instance Method Details</h2>
771
+
772
+
773
+ <div class="method_details first">
774
+ <h3 class="signature first" id="add_child-instance_method">
775
+
776
+ - (<tt>Object</tt>) <strong>add_child</strong>(node)
777
+
778
+
779
+
780
+
781
+
782
+ </h3><table class="source_code">
783
+ <tr>
784
+ <td>
785
+ <pre class="lines">
786
+
787
+
788
+ 23
789
+ 24
790
+ 25</pre>
791
+ </td>
792
+ <td>
793
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 23</span>
794
+
795
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_child'>add_child</span> <span class='id identifier rubyid_node'>node</span>
796
+ <span class='ivar'>@children</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
797
+ <span class='kw'>end</span></pre>
798
+ </td>
799
+ </tr>
800
+ </table>
801
+ </div>
802
+
803
+ <div class="method_details ">
804
+ <h3 class="signature " id="count-instance_method">
805
+
806
+ - (<tt>Object</tt>) <strong>count</strong>
807
+
808
+
809
+
810
+
811
+
812
+ </h3><table class="source_code">
813
+ <tr>
814
+ <td>
815
+ <pre class="lines">
816
+
817
+
818
+ 15
819
+ 16
820
+ 17
821
+ 18
822
+ 19
823
+ 20
824
+ 21</pre>
825
+ </td>
826
+ <td>
827
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 15</span>
828
+
829
+ <span class='kw'>def</span> <span class='id identifier rubyid_count'>count</span>
830
+ <span class='id identifier rubyid_sum'>sum</span> <span class='op'>=</span> <span class='int'>1</span>
831
+ <span class='ivar'>@children</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_child'>child</span><span class='op'>|</span>
832
+ <span class='id identifier rubyid_sum'>sum</span> <span class='op'>+=</span> <span class='id identifier rubyid_child'>child</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
833
+ <span class='kw'>end</span>
834
+ <span class='id identifier rubyid_sum'>sum</span>
835
+ <span class='kw'>end</span></pre>
836
+ </td>
837
+ </tr>
838
+ </table>
839
+ </div>
840
+
841
+ <div class="method_details ">
842
+ <h3 class="signature " id="draw-instance_method">
843
+
844
+ - (<tt>Object</tt>) <strong>draw</strong>
845
+
846
+
847
+
848
+
849
+
850
+ </h3><table class="source_code">
851
+ <tr>
852
+ <td>
853
+ <pre class="lines">
854
+
855
+
856
+ 55
857
+ 56
858
+ 57
859
+ 58
860
+ 59</pre>
861
+ </td>
862
+ <td>
863
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 55</span>
864
+
865
+ <span class='kw'>def</span> <span class='id identifier rubyid_draw'>draw</span>
866
+ <span class='ivar'>@children</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_child'>child</span><span class='op'>|</span>
867
+ <span class='id identifier rubyid_child'>child</span><span class='period'>.</span><span class='id identifier rubyid_draw'>draw</span>
868
+ <span class='kw'>end</span>
869
+ <span class='kw'>end</span></pre>
870
+ </td>
871
+ </tr>
872
+ </table>
873
+ </div>
874
+
875
+ <div class="method_details ">
876
+ <h3 class="signature " id="has_children?-instance_method">
877
+
878
+ - (<tt>Boolean</tt>) <strong>has_children?</strong>
879
+
880
+
881
+
882
+
883
+
884
+ </h3><div class="docstring">
885
+ <div class="discussion">
886
+
887
+
888
+ </div>
889
+ </div>
890
+ <div class="tags">
891
+
892
+ <p class="tag_title">Returns:</p>
893
+ <ul class="return">
894
+
895
+ <li>
896
+
897
+
898
+ <span class='type'>(<tt>Boolean</tt>)</span>
899
+
900
+
901
+
902
+ </li>
903
+
904
+ </ul>
905
+
906
+ </div><table class="source_code">
907
+ <tr>
908
+ <td>
909
+ <pre class="lines">
910
+
911
+
912
+ 31
913
+ 32
914
+ 33</pre>
915
+ </td>
916
+ <td>
917
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 31</span>
918
+
919
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_children?'>has_children?</span>
920
+ <span class='ivar'>@children</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
921
+ <span class='kw'>end</span></pre>
922
+ </td>
923
+ </tr>
924
+ </table>
925
+ </div>
926
+
927
+ <div class="method_details ">
928
+ <h3 class="signature " id="remove_child-instance_method">
929
+
930
+ - (<tt>Object</tt>) <strong>remove_child</strong>(node)
931
+
932
+
933
+
934
+
935
+
936
+ </h3><table class="source_code">
937
+ <tr>
938
+ <td>
939
+ <pre class="lines">
940
+
941
+
942
+ 27
943
+ 28
944
+ 29</pre>
945
+ </td>
946
+ <td>
947
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 27</span>
948
+
949
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_child'>remove_child</span> <span class='id identifier rubyid_node'>node</span>
950
+ <span class='ivar'>@children</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
951
+ <span class='kw'>end</span></pre>
952
+ </td>
953
+ </tr>
954
+ </table>
955
+ </div>
956
+
957
+ <div class="method_details ">
958
+ <h3 class="signature " id="update-instance_method">
959
+
960
+ - (<tt>Object</tt>) <strong>update</strong>(dt)
961
+
962
+
963
+
964
+
965
+
966
+ </h3><table class="source_code">
967
+ <tr>
968
+ <td>
969
+ <pre class="lines">
970
+
971
+
972
+ 35
973
+ 36
974
+ 37
975
+ 38
976
+ 39
977
+ 40
978
+ 41
979
+ 42
980
+ 43
981
+ 44
982
+ 45
983
+ 46
984
+ 47
985
+ 48
986
+ 49
987
+ 50
988
+ 51
989
+ 52
990
+ 53</pre>
991
+ </td>
992
+ <td>
993
+ <pre class="code"><span class="info file"># File 'lib/kawaii/node.rb', line 35</span>
994
+
995
+ <span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span> <span class='id identifier rubyid_dt'>dt</span>
996
+ <span class='kw'>if</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_method_defined?'>method_defined?</span> <span class='symbol'>:before_update</span>
997
+ <span class='id identifier rubyid_before_update'>before_update</span>
998
+ <span class='kw'>end</span>
999
+
1000
+ <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@static</span>
1001
+ <span class='ivar'>@velocity</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span> <span class='op'>+=</span> <span class='ivar'>@gravity</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span> <span class='op'>*</span> <span class='id identifier rubyid_dt'>dt</span>
1002
+ <span class='ivar'>@velocity</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span> <span class='op'>+=</span> <span class='ivar'>@gravity</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span> <span class='op'>*</span> <span class='id identifier rubyid_dt'>dt</span>
1003
+ <span class='ivar'>@position</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span> <span class='op'>+=</span> <span class='ivar'>@velocity</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span> <span class='op'>*</span> <span class='id identifier rubyid_dt'>dt</span>
1004
+ <span class='ivar'>@position</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span> <span class='op'>+=</span> <span class='ivar'>@velocity</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span> <span class='op'>*</span> <span class='id identifier rubyid_dt'>dt</span>
1005
+ <span class='ivar'>@children</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_child'>child</span><span class='op'>|</span>
1006
+ <span class='id identifier rubyid_child'>child</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span> <span class='id identifier rubyid_dt'>dt</span>
1007
+ <span class='kw'>end</span>
1008
+ <span class='kw'>end</span>
1009
+
1010
+ <span class='kw'>if</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_method_defined?'>method_defined?</span> <span class='symbol'>:after_update</span>
1011
+ <span class='id identifier rubyid_after_update'>after_update</span>
1012
+ <span class='kw'>end</span>
1013
+ <span class='kw'>end</span></pre>
1014
+ </td>
1015
+ </tr>
1016
+ </table>
1017
+ </div>
1018
+
1019
+ </div>
1020
+
1021
+ </div>
1022
+
1023
+ <div id="footer">
1024
+ Generated on Wed Jul 11 13:46:35 2012 by
1025
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1026
+ 0.8.2.1 (ruby-1.9.3).
1027
+ </div>
1028
+
1029
+ </body>
1030
+ </html>