kawaii 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,1141 @@
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::Game
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 (G)</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">Game</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::Game
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">Gosu::Window</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Gosu::Window</li>
82
+
83
+ <li class="next">Kawaii::Game</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/kawaii/game.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#content_manager-instance_method" title="#content_manager (instance method)">- (Object) <strong>content_manager</strong> </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Returns the value of attribute content_manager.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ <li class="public ">
139
+ <span class="summary_signature">
140
+
141
+ <a href="#font-instance_method" title="#font (instance method)">- (Object) <strong>font</strong> </a>
142
+
143
+
144
+
145
+ </span>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'>
159
+ <p>Returns the value of attribute font.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#fullscreen-instance_method" title="#fullscreen (instance method)">- (Object) <strong>fullscreen</strong> </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>Returns the value of attribute fullscreen.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ <li class="public ">
193
+ <span class="summary_signature">
194
+
195
+ <a href="#height-instance_method" title="#height (instance method)">- (Object) <strong>height</strong> </a>
196
+
197
+
198
+
199
+ </span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <span class="summary_desc"><div class='inline'>
213
+ <p>Returns the value of attribute height.</p>
214
+ </div></span>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#node_manager-instance_method" title="#node_manager (instance method)">- (Object) <strong>node_manager</strong> </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>Returns the value of attribute node_manager.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ <li class="public ">
247
+ <span class="summary_signature">
248
+
249
+ <a href="#show_fps-instance_method" title="#show_fps (instance method)">- (Object) <strong>show_fps</strong> </a>
250
+
251
+
252
+
253
+ </span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'>
267
+ <p>Returns the value of attribute show_fps.</p>
268
+ </div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="public ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#width-instance_method" title="#width (instance method)">- (Object) <strong>width</strong> </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ <span class="summary_desc"><div class='inline'>
294
+ <p>Returns the value of attribute width.</p>
295
+ </div></span>
296
+
297
+ </li>
298
+
299
+
300
+ </ul>
301
+
302
+
303
+
304
+
305
+
306
+ <h2>
307
+ Instance Method Summary
308
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
309
+ </h2>
310
+
311
+ <ul class="summary">
312
+
313
+ <li class="public ">
314
+ <span class="summary_signature">
315
+
316
+ <a href="#add_child-instance_method" title="#add_child (instance method)">- (Object) <strong>add_child</strong>(node) </a>
317
+
318
+
319
+
320
+ </span>
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+ <span class="summary_desc"><div class='inline'></div></span>
331
+
332
+ </li>
333
+
334
+
335
+ <li class="public ">
336
+ <span class="summary_signature">
337
+
338
+ <a href="#delta-instance_method" title="#delta (instance method)">- (Object) <strong>delta</strong> </a>
339
+
340
+
341
+
342
+ </span>
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'></div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#draw-instance_method" title="#draw (instance method)">- (Object) <strong>draw</strong> </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'></div></span>
375
+
376
+ </li>
377
+
378
+
379
+ <li class="public ">
380
+ <span class="summary_signature">
381
+
382
+ <a href="#get_fps-instance_method" title="#get_fps (instance method)">- (Object) <strong>get_fps</strong> </a>
383
+
384
+
385
+
386
+ </span>
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+ <span class="summary_desc"><div class='inline'></div></span>
397
+
398
+ </li>
399
+
400
+
401
+ <li class="public ">
402
+ <span class="summary_signature">
403
+
404
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Game) <strong>initialize</strong>(width, height, fullscreen, content_root, debug = true) </a>
405
+
406
+
407
+
408
+ </span>
409
+
410
+
411
+ <span class="note title constructor">constructor</span>
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+ <span class="summary_desc"><div class='inline'>
421
+ <p>A new instance of Game.</p>
422
+ </div></span>
423
+
424
+ </li>
425
+
426
+
427
+ <li class="public ">
428
+ <span class="summary_signature">
429
+
430
+ <a href="#print_stats-instance_method" title="#print_stats (instance method)">- (Object) <strong>print_stats</strong> </a>
431
+
432
+
433
+
434
+ </span>
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+ <span class="summary_desc"><div class='inline'></div></span>
445
+
446
+ </li>
447
+
448
+
449
+ <li class="public ">
450
+ <span class="summary_signature">
451
+
452
+ <a href="#remove_child-instance_method" title="#remove_child (instance method)">- (Object) <strong>remove_child</strong>(node) </a>
453
+
454
+
455
+
456
+ </span>
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+ <span class="summary_desc"><div class='inline'></div></span>
467
+
468
+ </li>
469
+
470
+
471
+ <li class="public ">
472
+ <span class="summary_signature">
473
+
474
+ <a href="#update-instance_method" title="#update (instance method)">- (Object) <strong>update</strong> </a>
475
+
476
+
477
+
478
+ </span>
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+ <span class="summary_desc"><div class='inline'></div></span>
489
+
490
+ </li>
491
+
492
+
493
+ </ul>
494
+
495
+
496
+
497
+ <div id="constructor_details" class="method_details_list">
498
+ <h2>Constructor Details</h2>
499
+
500
+ <div class="method_details first">
501
+ <h3 class="signature first" id="initialize-instance_method">
502
+
503
+ - (<tt><span class='object_link'><a href="" title="Kawaii::Game (class)">Game</a></span></tt>) <strong>initialize</strong>(width, height, fullscreen, content_root, debug = true)
504
+
505
+
506
+
507
+
508
+
509
+ </h3><div class="docstring">
510
+ <div class="discussion">
511
+
512
+ <p>A new instance of Game</p>
513
+
514
+
515
+ </div>
516
+ </div>
517
+ <div class="tags">
518
+
519
+
520
+ </div><table class="source_code">
521
+ <tr>
522
+ <td>
523
+ <pre class="lines">
524
+
525
+
526
+ 8
527
+ 9
528
+ 10
529
+ 11
530
+ 12
531
+ 13
532
+ 14
533
+ 15
534
+ 16
535
+ 17
536
+ 18
537
+ 19
538
+ 20
539
+ 21
540
+ 22
541
+ 23
542
+ 24
543
+ 25
544
+ 26
545
+ 27
546
+ 28
547
+ 29
548
+ 30
549
+ 31</pre>
550
+ </td>
551
+ <td>
552
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 8</span>
553
+
554
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='comma'>,</span> <span class='id identifier rubyid_fullscreen'>fullscreen</span><span class='comma'>,</span> <span class='id identifier rubyid_content_root'>content_root</span><span class='comma'>,</span> <span class='id identifier rubyid_debug'>debug</span> <span class='op'>=</span> <span class='kw'>true</span>
555
+ <span class='kw'>super</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='comma'>,</span> <span class='id identifier rubyid_fullscreen'>fullscreen</span>
556
+ <span class='ivar'>@width</span><span class='comma'>,</span> <span class='ivar'>@height</span><span class='comma'>,</span> <span class='ivar'>@fullscreen</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='comma'>,</span> <span class='id identifier rubyid_fullscreen'>fullscreen</span>
557
+
558
+ <span class='comment'># managers
559
+ </span> <span class='ivar'>@node_manager</span> <span class='op'>=</span> <span class='const'>Kawaii</span><span class='op'>::</span><span class='const'>NodeManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
560
+ <span class='ivar'>@content_manager</span> <span class='op'>=</span> <span class='const'>Kawaii</span><span class='op'>::</span><span class='const'>ContentManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_content_root'>content_root</span><span class='rparen'>)</span>
561
+ <span class='ivar'>@audio_manager</span> <span class='op'>=</span> <span class='const'>Kawaii</span><span class='op'>::</span><span class='const'>AudioManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
562
+ <span class='ivar'>@input_manager</span>
563
+
564
+ <span class='comment'># stats
565
+ </span> <span class='ivar'>@top_color</span> <span class='op'>=</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='const'>Color</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='int'>0xFF1EB1FA</span><span class='rparen'>)</span>
566
+ <span class='ivar'>@bottom_color</span> <span class='op'>=</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='const'>Color</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='int'>0xFF1D4DB5</span><span class='rparen'>)</span>
567
+ <span class='ivar'>@font</span> <span class='op'>=</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='const'>Font</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='id identifier rubyid_default_font_name'>default_font_name</span><span class='comma'>,</span> <span class='int'>18</span><span class='rparen'>)</span>
568
+ <span class='ivar'>@debug</span> <span class='op'>=</span> <span class='id identifier rubyid_debug'>debug</span>
569
+
570
+ <span class='kw'>if</span> <span class='ivar'>@debug</span>
571
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Game settings:</span><span class='tstring_end'>&quot;</span></span>
572
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tResolution: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_width'>width</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_height'>height</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
573
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tFullscreen: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_fullscreen'>fullscreen</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
574
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tContent root: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_content_root'>content_root</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
575
+ <span class='id identifier rubyid_print_stats'>print_stats</span>
576
+ <span class='kw'>end</span>
577
+ <span class='kw'>end</span></pre>
578
+ </td>
579
+ </tr>
580
+ </table>
581
+ </div>
582
+
583
+ </div>
584
+
585
+ <div id="instance_attr_details" class="attr_details">
586
+ <h2>Instance Attribute Details</h2>
587
+
588
+
589
+ <span id="content_manager=-instance_method"></span>
590
+ <div class="method_details first">
591
+ <h3 class="signature first" id="content_manager-instance_method">
592
+
593
+ - (<tt>Object</tt>) <strong>content_manager</strong>
594
+
595
+
596
+
597
+
598
+
599
+ </h3><div class="docstring">
600
+ <div class="discussion">
601
+
602
+ <p>Returns the value of attribute content_manager</p>
603
+
604
+
605
+ </div>
606
+ </div>
607
+ <div class="tags">
608
+
609
+
610
+ </div><table class="source_code">
611
+ <tr>
612
+ <td>
613
+ <pre class="lines">
614
+
615
+
616
+ 6
617
+ 7
618
+ 8</pre>
619
+ </td>
620
+ <td>
621
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
622
+
623
+ <span class='kw'>def</span> <span class='id identifier rubyid_content_manager'>content_manager</span>
624
+ <span class='ivar'>@content_manager</span>
625
+ <span class='kw'>end</span></pre>
626
+ </td>
627
+ </tr>
628
+ </table>
629
+ </div>
630
+
631
+
632
+ <span id="font=-instance_method"></span>
633
+ <div class="method_details ">
634
+ <h3 class="signature " id="font-instance_method">
635
+
636
+ - (<tt>Object</tt>) <strong>font</strong>
637
+
638
+
639
+
640
+
641
+
642
+ </h3><div class="docstring">
643
+ <div class="discussion">
644
+
645
+ <p>Returns the value of attribute font</p>
646
+
647
+
648
+ </div>
649
+ </div>
650
+ <div class="tags">
651
+
652
+
653
+ </div><table class="source_code">
654
+ <tr>
655
+ <td>
656
+ <pre class="lines">
657
+
658
+
659
+ 6
660
+ 7
661
+ 8</pre>
662
+ </td>
663
+ <td>
664
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
665
+
666
+ <span class='kw'>def</span> <span class='id identifier rubyid_font'>font</span>
667
+ <span class='ivar'>@font</span>
668
+ <span class='kw'>end</span></pre>
669
+ </td>
670
+ </tr>
671
+ </table>
672
+ </div>
673
+
674
+
675
+ <span id="fullscreen=-instance_method"></span>
676
+ <div class="method_details ">
677
+ <h3 class="signature " id="fullscreen-instance_method">
678
+
679
+ - (<tt>Object</tt>) <strong>fullscreen</strong>
680
+
681
+
682
+
683
+
684
+
685
+ </h3><div class="docstring">
686
+ <div class="discussion">
687
+
688
+ <p>Returns the value of attribute fullscreen</p>
689
+
690
+
691
+ </div>
692
+ </div>
693
+ <div class="tags">
694
+
695
+
696
+ </div><table class="source_code">
697
+ <tr>
698
+ <td>
699
+ <pre class="lines">
700
+
701
+
702
+ 6
703
+ 7
704
+ 8</pre>
705
+ </td>
706
+ <td>
707
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
708
+
709
+ <span class='kw'>def</span> <span class='id identifier rubyid_fullscreen'>fullscreen</span>
710
+ <span class='ivar'>@fullscreen</span>
711
+ <span class='kw'>end</span></pre>
712
+ </td>
713
+ </tr>
714
+ </table>
715
+ </div>
716
+
717
+
718
+ <span id="height=-instance_method"></span>
719
+ <div class="method_details ">
720
+ <h3 class="signature " id="height-instance_method">
721
+
722
+ - (<tt>Object</tt>) <strong>height</strong>
723
+
724
+
725
+
726
+
727
+
728
+ </h3><div class="docstring">
729
+ <div class="discussion">
730
+
731
+ <p>Returns the value of attribute height</p>
732
+
733
+
734
+ </div>
735
+ </div>
736
+ <div class="tags">
737
+
738
+
739
+ </div><table class="source_code">
740
+ <tr>
741
+ <td>
742
+ <pre class="lines">
743
+
744
+
745
+ 6
746
+ 7
747
+ 8</pre>
748
+ </td>
749
+ <td>
750
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
751
+
752
+ <span class='kw'>def</span> <span class='id identifier rubyid_height'>height</span>
753
+ <span class='ivar'>@height</span>
754
+ <span class='kw'>end</span></pre>
755
+ </td>
756
+ </tr>
757
+ </table>
758
+ </div>
759
+
760
+
761
+ <span id="node_manager=-instance_method"></span>
762
+ <div class="method_details ">
763
+ <h3 class="signature " id="node_manager-instance_method">
764
+
765
+ - (<tt>Object</tt>) <strong>node_manager</strong>
766
+
767
+
768
+
769
+
770
+
771
+ </h3><div class="docstring">
772
+ <div class="discussion">
773
+
774
+ <p>Returns the value of attribute node_manager</p>
775
+
776
+
777
+ </div>
778
+ </div>
779
+ <div class="tags">
780
+
781
+
782
+ </div><table class="source_code">
783
+ <tr>
784
+ <td>
785
+ <pre class="lines">
786
+
787
+
788
+ 6
789
+ 7
790
+ 8</pre>
791
+ </td>
792
+ <td>
793
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
794
+
795
+ <span class='kw'>def</span> <span class='id identifier rubyid_node_manager'>node_manager</span>
796
+ <span class='ivar'>@node_manager</span>
797
+ <span class='kw'>end</span></pre>
798
+ </td>
799
+ </tr>
800
+ </table>
801
+ </div>
802
+
803
+
804
+ <span id="show_fps=-instance_method"></span>
805
+ <div class="method_details ">
806
+ <h3 class="signature " id="show_fps-instance_method">
807
+
808
+ - (<tt>Object</tt>) <strong>show_fps</strong>
809
+
810
+
811
+
812
+
813
+
814
+ </h3><div class="docstring">
815
+ <div class="discussion">
816
+
817
+ <p>Returns the value of attribute show_fps</p>
818
+
819
+
820
+ </div>
821
+ </div>
822
+ <div class="tags">
823
+
824
+
825
+ </div><table class="source_code">
826
+ <tr>
827
+ <td>
828
+ <pre class="lines">
829
+
830
+
831
+ 6
832
+ 7
833
+ 8</pre>
834
+ </td>
835
+ <td>
836
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
837
+
838
+ <span class='kw'>def</span> <span class='id identifier rubyid_show_fps'>show_fps</span>
839
+ <span class='ivar'>@show_fps</span>
840
+ <span class='kw'>end</span></pre>
841
+ </td>
842
+ </tr>
843
+ </table>
844
+ </div>
845
+
846
+
847
+ <span id="width=-instance_method"></span>
848
+ <div class="method_details ">
849
+ <h3 class="signature " id="width-instance_method">
850
+
851
+ - (<tt>Object</tt>) <strong>width</strong>
852
+
853
+
854
+
855
+
856
+
857
+ </h3><div class="docstring">
858
+ <div class="discussion">
859
+
860
+ <p>Returns the value of attribute width</p>
861
+
862
+
863
+ </div>
864
+ </div>
865
+ <div class="tags">
866
+
867
+
868
+ </div><table class="source_code">
869
+ <tr>
870
+ <td>
871
+ <pre class="lines">
872
+
873
+
874
+ 6
875
+ 7
876
+ 8</pre>
877
+ </td>
878
+ <td>
879
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 6</span>
880
+
881
+ <span class='kw'>def</span> <span class='id identifier rubyid_width'>width</span>
882
+ <span class='ivar'>@width</span>
883
+ <span class='kw'>end</span></pre>
884
+ </td>
885
+ </tr>
886
+ </table>
887
+ </div>
888
+
889
+ </div>
890
+
891
+
892
+ <div id="instance_method_details" class="method_details_list">
893
+ <h2>Instance Method Details</h2>
894
+
895
+
896
+ <div class="method_details first">
897
+ <h3 class="signature first" id="add_child-instance_method">
898
+
899
+ - (<tt>Object</tt>) <strong>add_child</strong>(node)
900
+
901
+
902
+
903
+
904
+
905
+ </h3><table class="source_code">
906
+ <tr>
907
+ <td>
908
+ <pre class="lines">
909
+
910
+
911
+ 33
912
+ 34
913
+ 35</pre>
914
+ </td>
915
+ <td>
916
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 33</span>
917
+
918
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_child'>add_child</span> <span class='id identifier rubyid_node'>node</span>
919
+ <span class='ivar'>@node_manager</span><span class='period'>.</span><span class='id identifier rubyid_add_node'>add_node</span> <span class='id identifier rubyid_node'>node</span>
920
+ <span class='kw'>end</span></pre>
921
+ </td>
922
+ </tr>
923
+ </table>
924
+ </div>
925
+
926
+ <div class="method_details ">
927
+ <h3 class="signature " id="delta-instance_method">
928
+
929
+ - (<tt>Object</tt>) <strong>delta</strong>
930
+
931
+
932
+
933
+
934
+
935
+ </h3><table class="source_code">
936
+ <tr>
937
+ <td>
938
+ <pre class="lines">
939
+
940
+
941
+ 52
942
+ 53
943
+ 54</pre>
944
+ </td>
945
+ <td>
946
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 52</span>
947
+
948
+ <span class='kw'>def</span> <span class='id identifier rubyid_delta'>delta</span>
949
+ <span class='float'>16.0</span> <span class='comment'># TODO: real delta
950
+ </span><span class='kw'>end</span></pre>
951
+ </td>
952
+ </tr>
953
+ </table>
954
+ </div>
955
+
956
+ <div class="method_details ">
957
+ <h3 class="signature " id="draw-instance_method">
958
+
959
+ - (<tt>Object</tt>) <strong>draw</strong>
960
+
961
+
962
+
963
+
964
+
965
+ </h3><table class="source_code">
966
+ <tr>
967
+ <td>
968
+ <pre class="lines">
969
+
970
+
971
+ 60
972
+ 61
973
+ 62
974
+ 63
975
+ 64
976
+ 65
977
+ 66
978
+ 67
979
+ 68
980
+ 69
981
+ 70
982
+ 71</pre>
983
+ </td>
984
+ <td>
985
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 60</span>
986
+
987
+ <span class='kw'>def</span> <span class='id identifier rubyid_draw'>draw</span>
988
+ <span class='id identifier rubyid_draw_quad'>draw_quad</span><span class='lparen'>(</span>
989
+ <span class='int'>0</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='ivar'>@top_color</span><span class='comma'>,</span>
990
+ <span class='ivar'>@width</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='ivar'>@top_color</span><span class='comma'>,</span>
991
+ <span class='ivar'>@width</span><span class='comma'>,</span> <span class='ivar'>@height</span><span class='comma'>,</span> <span class='ivar'>@bottom_color</span><span class='comma'>,</span>
992
+ <span class='int'>0</span><span class='comma'>,</span> <span class='ivar'>@height</span><span class='comma'>,</span> <span class='ivar'>@bottom_color</span><span class='comma'>,</span>
993
+ <span class='rparen'>)</span>
994
+ <span class='ivar'>@node_manager</span><span class='period'>.</span><span class='id identifier rubyid_draw'>draw</span>
995
+ <span class='kw'>if</span> <span class='ivar'>@debug</span>
996
+ <span class='ivar'>@font</span><span class='period'>.</span><span class='id identifier rubyid_draw'>draw</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FPS: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_get_fps'>get_fps</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>14</span><span class='comma'>,</span> <span class='int'>14</span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
997
+ <span class='kw'>end</span>
998
+ <span class='kw'>end</span></pre>
999
+ </td>
1000
+ </tr>
1001
+ </table>
1002
+ </div>
1003
+
1004
+ <div class="method_details ">
1005
+ <h3 class="signature " id="get_fps-instance_method">
1006
+
1007
+ - (<tt>Object</tt>) <strong>get_fps</strong>
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+ </h3><table class="source_code">
1014
+ <tr>
1015
+ <td>
1016
+ <pre class="lines">
1017
+
1018
+
1019
+ 56
1020
+ 57
1021
+ 58</pre>
1022
+ </td>
1023
+ <td>
1024
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 56</span>
1025
+
1026
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_fps'>get_fps</span>
1027
+ <span class='float'>1000.0</span> <span class='op'>/</span> <span class='id identifier rubyid_delta'>delta</span>
1028
+ <span class='kw'>end</span></pre>
1029
+ </td>
1030
+ </tr>
1031
+ </table>
1032
+ </div>
1033
+
1034
+ <div class="method_details ">
1035
+ <h3 class="signature " id="print_stats-instance_method">
1036
+
1037
+ - (<tt>Object</tt>) <strong>print_stats</strong>
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+ </h3><table class="source_code">
1044
+ <tr>
1045
+ <td>
1046
+ <pre class="lines">
1047
+
1048
+
1049
+ 41
1050
+ 42
1051
+ 43
1052
+ 44</pre>
1053
+ </td>
1054
+ <td>
1055
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 41</span>
1056
+
1057
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_stats'>print_stats</span>
1058
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Statistics:</span><span class='tstring_end'>&quot;</span></span>
1059
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Nodes: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node_manager'>node_manager</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1060
+ <span class='kw'>end</span></pre>
1061
+ </td>
1062
+ </tr>
1063
+ </table>
1064
+ </div>
1065
+
1066
+ <div class="method_details ">
1067
+ <h3 class="signature " id="remove_child-instance_method">
1068
+
1069
+ - (<tt>Object</tt>) <strong>remove_child</strong>(node)
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+ </h3><table class="source_code">
1076
+ <tr>
1077
+ <td>
1078
+ <pre class="lines">
1079
+
1080
+
1081
+ 37
1082
+ 38
1083
+ 39</pre>
1084
+ </td>
1085
+ <td>
1086
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 37</span>
1087
+
1088
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_child'>remove_child</span> <span class='id identifier rubyid_node'>node</span>
1089
+ <span class='ivar'>@node_manager</span><span class='period'>.</span><span class='id identifier rubyid_remove_node'>remove_node</span> <span class='id identifier rubyid_node'>node</span>
1090
+ <span class='kw'>end</span></pre>
1091
+ </td>
1092
+ </tr>
1093
+ </table>
1094
+ </div>
1095
+
1096
+ <div class="method_details ">
1097
+ <h3 class="signature " id="update-instance_method">
1098
+
1099
+ - (<tt>Object</tt>) <strong>update</strong>
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+ </h3><table class="source_code">
1106
+ <tr>
1107
+ <td>
1108
+ <pre class="lines">
1109
+
1110
+
1111
+ 46
1112
+ 47
1113
+ 48
1114
+ 49
1115
+ 50</pre>
1116
+ </td>
1117
+ <td>
1118
+ <pre class="code"><span class="info file"># File 'lib/kawaii/game.rb', line 46</span>
1119
+
1120
+ <span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span>
1121
+ <span class='ivar'>@dt</span> <span class='op'>=</span> <span class='id identifier rubyid_delta'>delta</span><span class='lparen'>(</span><span class='rparen'>)</span>
1122
+ <span class='ivar'>@node_manager</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span> <span class='ivar'>@dt</span>
1123
+ <span class='id identifier rubyid_update_game'>update_game</span>
1124
+ <span class='kw'>end</span></pre>
1125
+ </td>
1126
+ </tr>
1127
+ </table>
1128
+ </div>
1129
+
1130
+ </div>
1131
+
1132
+ </div>
1133
+
1134
+ <div id="footer">
1135
+ Generated on Wed Jul 11 13:46:34 2012 by
1136
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1137
+ 0.8.2.1 (ruby-1.9.3).
1138
+ </div>
1139
+
1140
+ </body>
1141
+ </html>