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,487 @@
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::ContentManager
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 (C)</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">ContentManager</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::ContentManager
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::ContentManager</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/content_manager.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#images-instance_method" title="#images (instance method)">- (Object) <strong>images</strong> </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'>
130
+ <p>Returns the value of attribute images.</p>
131
+ </div></span>
132
+
133
+ </li>
134
+
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#root-instance_method" title="#root (instance method)">- (Object) <strong>root</strong> </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>
157
+ <p>Returns the value of attribute root.</p>
158
+ </div></span>
159
+
160
+ </li>
161
+
162
+
163
+ </ul>
164
+
165
+
166
+
167
+
168
+
169
+ <h2>
170
+ Instance Method Summary
171
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
172
+ </h2>
173
+
174
+ <ul class="summary">
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#clear-instance_method" title="#clear (instance method)">- (Object) <strong>clear</strong> </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'></div></span>
194
+
195
+ </li>
196
+
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (ContentManager) <strong>initialize</strong>(window, root) </a>
202
+
203
+
204
+
205
+ </span>
206
+
207
+
208
+ <span class="note title constructor">constructor</span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'>
218
+ <p>A new instance of ContentManager.</p>
219
+ </div></span>
220
+
221
+ </li>
222
+
223
+
224
+ <li class="public ">
225
+ <span class="summary_signature">
226
+
227
+ <a href="#load_image-instance_method" title="#load_image (instance method)">- (Object) <strong>load_image</strong>(path, tileable = false) </a>
228
+
229
+
230
+
231
+ </span>
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'>
242
+ <p>loads an image and caches it for further use if an image has been loaded it
243
+ is just being returned.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ </ul>
250
+
251
+
252
+ <div id="constructor_details" class="method_details_list">
253
+ <h2>Constructor Details</h2>
254
+
255
+ <div class="method_details first">
256
+ <h3 class="signature first" id="initialize-instance_method">
257
+
258
+ - (<tt><span class='object_link'><a href="" title="Kawaii::ContentManager (class)">ContentManager</a></span></tt>) <strong>initialize</strong>(window, root)
259
+
260
+
261
+
262
+
263
+
264
+ </h3><div class="docstring">
265
+ <div class="discussion">
266
+
267
+ <p>A new instance of ContentManager</p>
268
+
269
+
270
+ </div>
271
+ </div>
272
+ <div class="tags">
273
+
274
+
275
+ </div><table class="source_code">
276
+ <tr>
277
+ <td>
278
+ <pre class="lines">
279
+
280
+
281
+ 8
282
+ 9
283
+ 10
284
+ 11
285
+ 12</pre>
286
+ </td>
287
+ <td>
288
+ <pre class="code"><span class="info file"># File 'lib/kawaii/content_manager.rb', line 8</span>
289
+
290
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_window'>window</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span>
291
+ <span class='ivar'>@window</span> <span class='op'>=</span> <span class='id identifier rubyid_window'>window</span>
292
+ <span class='ivar'>@root</span> <span class='op'>=</span> <span class='id identifier rubyid_root'>root</span>
293
+ <span class='ivar'>@images</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
294
+ <span class='kw'>end</span></pre>
295
+ </td>
296
+ </tr>
297
+ </table>
298
+ </div>
299
+
300
+ </div>
301
+
302
+ <div id="instance_attr_details" class="attr_details">
303
+ <h2>Instance Attribute Details</h2>
304
+
305
+
306
+ <span id="images=-instance_method"></span>
307
+ <div class="method_details first">
308
+ <h3 class="signature first" id="images-instance_method">
309
+
310
+ - (<tt>Object</tt>) <strong>images</strong>
311
+
312
+
313
+
314
+
315
+
316
+ </h3><div class="docstring">
317
+ <div class="discussion">
318
+
319
+ <p>Returns the value of attribute images</p>
320
+
321
+
322
+ </div>
323
+ </div>
324
+ <div class="tags">
325
+
326
+
327
+ </div><table class="source_code">
328
+ <tr>
329
+ <td>
330
+ <pre class="lines">
331
+
332
+
333
+ 6
334
+ 7
335
+ 8</pre>
336
+ </td>
337
+ <td>
338
+ <pre class="code"><span class="info file"># File 'lib/kawaii/content_manager.rb', line 6</span>
339
+
340
+ <span class='kw'>def</span> <span class='id identifier rubyid_images'>images</span>
341
+ <span class='ivar'>@images</span>
342
+ <span class='kw'>end</span></pre>
343
+ </td>
344
+ </tr>
345
+ </table>
346
+ </div>
347
+
348
+
349
+ <span id="root=-instance_method"></span>
350
+ <div class="method_details ">
351
+ <h3 class="signature " id="root-instance_method">
352
+
353
+ - (<tt>Object</tt>) <strong>root</strong>
354
+
355
+
356
+
357
+
358
+
359
+ </h3><div class="docstring">
360
+ <div class="discussion">
361
+
362
+ <p>Returns the value of attribute root</p>
363
+
364
+
365
+ </div>
366
+ </div>
367
+ <div class="tags">
368
+
369
+
370
+ </div><table class="source_code">
371
+ <tr>
372
+ <td>
373
+ <pre class="lines">
374
+
375
+
376
+ 6
377
+ 7
378
+ 8</pre>
379
+ </td>
380
+ <td>
381
+ <pre class="code"><span class="info file"># File 'lib/kawaii/content_manager.rb', line 6</span>
382
+
383
+ <span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
384
+ <span class='ivar'>@root</span>
385
+ <span class='kw'>end</span></pre>
386
+ </td>
387
+ </tr>
388
+ </table>
389
+ </div>
390
+
391
+ </div>
392
+
393
+
394
+ <div id="instance_method_details" class="method_details_list">
395
+ <h2>Instance Method Details</h2>
396
+
397
+
398
+ <div class="method_details first">
399
+ <h3 class="signature first" id="clear-instance_method">
400
+
401
+ - (<tt>Object</tt>) <strong>clear</strong>
402
+
403
+
404
+
405
+
406
+
407
+ </h3><table class="source_code">
408
+ <tr>
409
+ <td>
410
+ <pre class="lines">
411
+
412
+
413
+ 14
414
+ 15
415
+ 16</pre>
416
+ </td>
417
+ <td>
418
+ <pre class="code"><span class="info file"># File 'lib/kawaii/content_manager.rb', line 14</span>
419
+
420
+ <span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
421
+ <span class='ivar'>@images</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
422
+ <span class='kw'>end</span></pre>
423
+ </td>
424
+ </tr>
425
+ </table>
426
+ </div>
427
+
428
+ <div class="method_details ">
429
+ <h3 class="signature " id="load_image-instance_method">
430
+
431
+ - (<tt>Object</tt>) <strong>load_image</strong>(path, tileable = false)
432
+
433
+
434
+
435
+
436
+
437
+ </h3><div class="docstring">
438
+ <div class="discussion">
439
+
440
+ <p>loads an image and caches it for further use if an image has been loaded it
441
+ is just being returned</p>
442
+
443
+
444
+ </div>
445
+ </div>
446
+ <div class="tags">
447
+
448
+
449
+ </div><table class="source_code">
450
+ <tr>
451
+ <td>
452
+ <pre class="lines">
453
+
454
+
455
+ 20
456
+ 21
457
+ 22
458
+ 23
459
+ 24
460
+ 25</pre>
461
+ </td>
462
+ <td>
463
+ <pre class="code"><span class="info file"># File 'lib/kawaii/content_manager.rb', line 20</span>
464
+
465
+ <span class='kw'>def</span> <span class='id identifier rubyid_load_image'>load_image</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_tileable'>tileable</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
466
+ <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@images</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span>
467
+ <span class='ivar'>@images</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='const'>Image</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@window</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@root</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_tileable'>tileable</span><span class='rparen'>)</span>
468
+ <span class='kw'>end</span>
469
+ <span class='ivar'>@images</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span>
470
+ <span class='kw'>end</span></pre>
471
+ </td>
472
+ </tr>
473
+ </table>
474
+ </div>
475
+
476
+ </div>
477
+
478
+ </div>
479
+
480
+ <div id="footer">
481
+ Generated on Wed Jul 11 13:46:35 2012 by
482
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
483
+ 0.8.2.1 (ruby-1.9.3).
484
+ </div>
485
+
486
+ </body>
487
+ </html>