motion-game 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/build/android/armeabi/libchipmunk.a +0 -0
  3. data/build/android/armeabi/libcrypto.a +0 -0
  4. data/build/android/armeabi/libcurl.a +0 -0
  5. data/build/android/armeabi/libfreetype.a +0 -0
  6. data/build/android/armeabi/libjpeg.a +0 -0
  7. data/build/android/armeabi/libmotion-cocos.a +0 -0
  8. data/build/android/armeabi/libpng.a +0 -0
  9. data/build/android/armeabi/libssl.a +0 -0
  10. data/build/android/armeabi/libtiff.a +0 -0
  11. data/build/android/armeabi/libwebp.a +0 -0
  12. data/build/android/armeabi/libwebsockets.a +0 -0
  13. data/build/android/motion-cocos.jar +0 -0
  14. data/build/android/x86/libchipmunk.a +0 -0
  15. data/build/android/x86/libcrypto.a +0 -0
  16. data/build/android/x86/libcurl.a +0 -0
  17. data/build/android/x86/libfreetype.a +0 -0
  18. data/build/android/x86/libjpeg.a +0 -0
  19. data/build/android/x86/libmotion-cocos.a +0 -0
  20. data/build/android/x86/libpng.a +0 -0
  21. data/build/android/x86/libssl.a +0 -0
  22. data/build/android/x86/libtiff.a +0 -0
  23. data/build/android/x86/libwebp.a +0 -0
  24. data/build/android/x86/libwebsockets.a +0 -0
  25. data/build/ios/libchipmunk.a +0 -0
  26. data/build/ios/libcurl.a +0 -0
  27. data/build/ios/libfreetype.a +0 -0
  28. data/build/ios/libjpeg.a +0 -0
  29. data/build/ios/libmotion-cocos.a +0 -0
  30. data/build/ios/libpng.a +0 -0
  31. data/build/ios/libtiff.a +0 -0
  32. data/build/ios/libwebp.a +0 -0
  33. data/build/ios/libwebsockets.a +0 -0
  34. data/doc/MG.html +129 -0
  35. data/doc/MG/Application.html +332 -0
  36. data/doc/MG/Audio.html +1049 -0
  37. data/doc/MG/Button.html +722 -0
  38. data/doc/MG/Color.html +528 -0
  39. data/doc/MG/Director.html +1140 -0
  40. data/doc/MG/Draw.html +437 -0
  41. data/doc/MG/Events.html +127 -0
  42. data/doc/MG/Events/Acceleration.html +502 -0
  43. data/doc/MG/Events/Touch.html +232 -0
  44. data/doc/MG/Layout.html +513 -0
  45. data/doc/MG/List.html +1050 -0
  46. data/doc/MG/Node.html +1752 -0
  47. data/doc/MG/Parallax.html +294 -0
  48. data/doc/MG/Particle.html +1221 -0
  49. data/doc/MG/Point.html +540 -0
  50. data/doc/MG/Scene.html +1250 -0
  51. data/doc/MG/Scroll.html +530 -0
  52. data/doc/MG/Size.html +737 -0
  53. data/doc/MG/Slider.html +335 -0
  54. data/doc/MG/Sprite.html +2066 -0
  55. data/doc/MG/Text.html +918 -0
  56. data/doc/MG/Web.html +828 -0
  57. data/doc/MG/Widget.html +460 -0
  58. data/doc/_index.html +362 -0
  59. data/doc/class_list.html +58 -0
  60. data/doc/css/common.css +1 -0
  61. data/doc/css/full_list.css +57 -0
  62. data/doc/css/style.css +339 -0
  63. data/doc/file.README.html +114 -0
  64. data/doc/file_list.html +60 -0
  65. data/doc/frames.html +26 -0
  66. data/doc/index.html +114 -0
  67. data/doc/js/app.js +219 -0
  68. data/doc/js/full_list.js +181 -0
  69. data/doc/js/jquery.js +4 -0
  70. data/doc/method_list.html +933 -0
  71. data/doc/top-level-namespace.html +112 -0
  72. data/lib/motion-game.rb +1 -0
  73. data/lib/motion-game/android.rb +23 -0
  74. data/lib/motion-game/android/main_activity.rb +2 -0
  75. data/lib/motion-game/ios.rb +14 -0
  76. data/lib/motion-game/ios/app_delegate.rb +20 -0
  77. data/lib/motion-game/ios/root_view_controller.rb +14 -0
  78. data/lib/motion-game/project.rb +1 -0
  79. data/lib/motion-game/shortcuts.rb +177 -0
  80. data/template/motion-game/files/Gemfile +5 -0
  81. data/template/motion-game/files/Rakefile +12 -0
  82. data/template/motion-game/files/app/application.rb +5 -0
  83. data/template/motion-game/files/app/main_scene.rb +7 -0
  84. data/template/motion-game/files/config/android.rb.erb +6 -0
  85. data/template/motion-game/files/config/ios.rb.erb +6 -0
  86. metadata +130 -0
@@ -0,0 +1,1250 @@
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: MG::Scene
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" 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#!MG/Scene.html";
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 (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
36
+ &raquo;
37
+ <span class="title">Scene</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: MG::Scene
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"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></li>
82
+
83
+ <li class="next">MG::Scene</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">motion-game</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>This class represents a scene, an independent screen or stage of the
108
+ application workflow. A scene is responsible for handling events from the
109
+ device, providing a physics world for the sprites, and also starting the
110
+ game loop. An application must have at least one scene, and the
111
+ <code>Scene</code> class is designed to be subclassed.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div>
120
+
121
+
122
+
123
+ <h2>Properties <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#debug_physics%3F-instance_method" title="#debug_physics? (instance method)">- (Boolean) <strong>debug_physics?</strong> </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'>
147
+ <p>Whether the physics engine should draw debug lines.</p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#gravity-instance_method" title="#gravity (instance method)">- (Point) <strong>gravity</strong> </a>
157
+
158
+
159
+
160
+ </span>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'>
174
+ <p>The gravity of the scene&#39;s physics world.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ </ul>
181
+
182
+
183
+
184
+
185
+
186
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
187
+ <p class="inherited"><span class='object_link'><a href="Node.html#alpha-instance_method" title="MG::Node#alpha (method)">#alpha</a></span>, <span class='object_link'><a href="Node.html#anchor_point-instance_method" title="MG::Node#anchor_point (method)">#anchor_point</a></span>, <span class='object_link'><a href="Node.html#color-instance_method" title="MG::Node#color (method)">#color</a></span>, <span class='object_link'><a href="Node.html#name-instance_method" title="MG::Node#name (method)">#name</a></span>, <span class='object_link'><a href="Node.html#position-instance_method" title="MG::Node#position (method)">#position</a></span>, <span class='object_link'><a href="Node.html#rotation-instance_method" title="MG::Node#rotation (method)">#rotation</a></span>, <span class='object_link'><a href="Node.html#scale-instance_method" title="MG::Node#scale (method)">#scale</a></span>, <span class='object_link'><a href="Node.html#size-instance_method" title="MG::Node#size (method)">#size</a></span>, <span class='object_link'><a href="Node.html#visible%3F-instance_method" title="MG::Node#visible? (method)">#visible?</a></span>, <span class='object_link'><a href="Node.html#z_index-instance_method" title="MG::Node#z_index (method)">#z_index</a></span></p>
188
+
189
+
190
+
191
+ <h2>
192
+ Constructors
193
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
194
+ </h2>
195
+
196
+ <ul class="summary">
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Scene) <strong>initialize</strong> </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>The default initializer.</p>
219
+ </div></span>
220
+
221
+ </li>
222
+
223
+
224
+ </ul>
225
+
226
+ <h2>
227
+ Update Loop
228
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
229
+ </h2>
230
+
231
+ <ul class="summary">
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#schedule-instance_method" title="#schedule (instance method)">- (String) <strong>schedule</strong>(delay, repeat = 0, interval = 0) {|Float| ... }</a>
237
+
238
+
239
+
240
+ </span>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ <span class="summary_desc"><div class='inline'>
251
+ <p>Schedules a given block for execution.</p>
252
+ </div></span>
253
+
254
+ </li>
255
+
256
+
257
+ <li class="public ">
258
+ <span class="summary_signature">
259
+
260
+ <a href="#start_update-instance_method" title="#start_update (instance method)">- (Scene) <strong>start_update</strong> </a>
261
+
262
+
263
+
264
+ </span>
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+ <span class="summary_desc"><div class='inline'>
275
+ <p>Starts the update loop.</p>
276
+ </div></span>
277
+
278
+ </li>
279
+
280
+
281
+ <li class="public ">
282
+ <span class="summary_signature">
283
+
284
+ <a href="#stop_update-instance_method" title="#stop_update (instance method)">- (Scene) <strong>stop_update</strong> </a>
285
+
286
+
287
+
288
+ </span>
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+ <span class="summary_desc"><div class='inline'>
299
+ <p>Stops the update loop.</p>
300
+ </div></span>
301
+
302
+ </li>
303
+
304
+
305
+ <li class="public ">
306
+ <span class="summary_signature">
307
+
308
+ <a href="#unschedule-instance_method" title="#unschedule (instance method)">- (Scene) <strong>unschedule</strong>(key) </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="summary_desc"><div class='inline'>
323
+ <p>Unschedules a task that&#39;s currently running.</p>
324
+ </div></span>
325
+
326
+ </li>
327
+
328
+
329
+ <li class="public ">
330
+ <span class="summary_signature">
331
+
332
+ <a href="#update-instance_method" title="#update (instance method)">- (Scene) <strong>update</strong>(delta) </a>
333
+
334
+
335
+
336
+ </span>
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+ <span class="summary_desc"><div class='inline'>
347
+ <p>The update loop method.</p>
348
+ </div></span>
349
+
350
+ </li>
351
+
352
+
353
+ </ul>
354
+
355
+ <h2>
356
+ Events
357
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
358
+ </h2>
359
+
360
+ <ul class="summary">
361
+
362
+ <li class="public ">
363
+ <span class="summary_signature">
364
+
365
+ <a href="#on_accelerate-instance_method" title="#on_accelerate (instance method)">- (Scene) <strong>on_accelerate</strong> {|Events::Acceleration| ... }</a>
366
+
367
+
368
+
369
+ </span>
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+ <span class="summary_desc"><div class='inline'>
380
+ <p>Starts listening for accelerometer events on the receiver.</p>
381
+ </div></span>
382
+
383
+ </li>
384
+
385
+
386
+ <li class="public ">
387
+ <span class="summary_signature">
388
+
389
+ <a href="#on_contact_begin-instance_method" title="#on_contact_begin (instance method)">- (Scene) <strong>on_contact_begin</strong> {|Events::PhysicsContact| ... }</a>
390
+
391
+
392
+
393
+ </span>
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+ <span class="summary_desc"><div class='inline'>
404
+ <p>Starts listening for contact begin events from the physics engine.</p>
405
+ </div></span>
406
+
407
+ </li>
408
+
409
+
410
+ <li class="public ">
411
+ <span class="summary_signature">
412
+
413
+ <a href="#on_touch_begin-instance_method" title="#on_touch_begin (instance method)">- (Scene) <strong>on_touch_begin</strong> {|Events::Touch| ... }</a>
414
+
415
+
416
+
417
+ </span>
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+ <span class="summary_desc"><div class='inline'>
428
+ <p>Starts listening for touch begin events on the receiver.</p>
429
+ </div></span>
430
+
431
+ </li>
432
+
433
+
434
+ </ul>
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
447
+ <p class="inherited"><span class='object_link'><a href="Node.html#add-instance_method" title="MG::Node#add (method)">#add</a></span>, <span class='object_link'><a href="Node.html#children-instance_method" title="MG::Node#children (method)">#children</a></span>, <span class='object_link'><a href="Node.html#clear-instance_method" title="MG::Node#clear (method)">#clear</a></span>, <span class='object_link'><a href="Node.html#delete-instance_method" title="MG::Node#delete (method)">#delete</a></span>, <span class='object_link'><a href="Node.html#delete_from_parent-instance_method" title="MG::Node#delete_from_parent (method)">#delete_from_parent</a></span>, <span class='object_link'><a href="Node.html#intersects%3F-instance_method" title="MG::Node#intersects? (method)">#intersects?</a></span>, <span class='object_link'><a href="Node.html#parent-instance_method" title="MG::Node#parent (method)">#parent</a></span></p>
448
+ <div id="constructor_details" class="method_details_list">
449
+ <h2>Constructor Details</h2>
450
+
451
+ <div class="method_details first">
452
+ <h3 class="signature first" id="initialize-instance_method">
453
+
454
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>initialize</strong>
455
+
456
+
457
+
458
+
459
+
460
+ </h3><div class="docstring">
461
+ <div class="discussion">
462
+
463
+ <p>The default initializer. Subclasses can construct the scene interface in
464
+ this method, as well as providing an implementation for <span class='object_link'><a href="#update-instance_method" title="MG::Scene#update (method)">#update</a></span>, then run
465
+ the update loop by calling <span class='object_link'><a href="#start_update-instance_method" title="MG::Scene#start_update (method)">#start_update</a></span>.</p>
466
+
467
+
468
+ </div>
469
+ </div>
470
+ <div class="tags">
471
+
472
+
473
+ </div><table class="source_code">
474
+ <tr>
475
+ <td>
476
+ <pre class="lines">
477
+
478
+
479
+ 184</pre>
480
+ </td>
481
+ <td>
482
+ <pre class="code"><span class="info file"># File 'motion-game', line 184</span>
483
+
484
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
485
+ </td>
486
+ </tr>
487
+ </table>
488
+ </div>
489
+
490
+ </div>
491
+
492
+ <div id="instance_attr_details" class="attr_details">
493
+ <h2>Instance Attribute Details</h2>
494
+
495
+
496
+ <span id="debug_physics?=-instance_method"></span>
497
+ <div class="method_details first">
498
+ <h3 class="signature first" id="debug_physics?-instance_method">
499
+
500
+ - (<tt>Boolean</tt>) <strong>debug_physics?</strong>
501
+
502
+
503
+
504
+
505
+
506
+ </h3><div class="docstring">
507
+ <div class="discussion">
508
+
509
+ <p>Returns whether the physics engine should draw debug lines.</p>
510
+
511
+
512
+ </div>
513
+ </div>
514
+ <div class="tags">
515
+
516
+ <p class="tag_title">Returns:</p>
517
+ <ul class="return">
518
+
519
+ <li>
520
+
521
+
522
+ <span class='type'>(<tt>Boolean</tt>)</span>
523
+
524
+
525
+
526
+ &mdash;
527
+ <div class='inline'>
528
+ <p>whether the physics engine should draw debug lines.</p>
529
+ </div>
530
+
531
+ </li>
532
+
533
+ </ul>
534
+
535
+ </div><table class="source_code">
536
+ <tr>
537
+ <td>
538
+ <pre class="lines">
539
+
540
+
541
+ 250
542
+ 251
543
+ 252</pre>
544
+ </td>
545
+ <td>
546
+ <pre class="code"><span class="info file"># File 'motion-game', line 250</span>
547
+
548
+ def debug_physics?
549
+ @debug_physics?
550
+ end</pre>
551
+ </td>
552
+ </tr>
553
+ </table>
554
+ </div>
555
+
556
+
557
+ <span id="gravity=-instance_method"></span>
558
+ <div class="method_details ">
559
+ <h3 class="signature " id="gravity-instance_method">
560
+
561
+ - (<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>) <strong>gravity</strong>
562
+
563
+
564
+
565
+
566
+
567
+ </h3><div class="docstring">
568
+ <div class="discussion">
569
+
570
+ <p>Returns the gravity of the scene&#39;s physics world.</p>
571
+
572
+
573
+ </div>
574
+ </div>
575
+ <div class="tags">
576
+
577
+ <p class="tag_title">Returns:</p>
578
+ <ul class="return">
579
+
580
+ <li>
581
+
582
+
583
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
584
+
585
+
586
+
587
+ &mdash;
588
+ <div class='inline'>
589
+ <p>the gravity of the scene&#39;s physics world.</p>
590
+ </div>
591
+
592
+ </li>
593
+
594
+ </ul>
595
+
596
+ </div><table class="source_code">
597
+ <tr>
598
+ <td>
599
+ <pre class="lines">
600
+
601
+
602
+ 247
603
+ 248
604
+ 249</pre>
605
+ </td>
606
+ <td>
607
+ <pre class="code"><span class="info file"># File 'motion-game', line 247</span>
608
+
609
+ <span class='kw'>def</span> <span class='id identifier rubyid_gravity'>gravity</span>
610
+ <span class='ivar'>@gravity</span>
611
+ <span class='kw'>end</span></pre>
612
+ </td>
613
+ </tr>
614
+ </table>
615
+ </div>
616
+
617
+ </div>
618
+
619
+
620
+ <div id="instance_method_details" class="method_details_list">
621
+ <h2>Instance Method Details</h2>
622
+
623
+
624
+ <div class="method_details first">
625
+ <h3 class="signature first" id="on_accelerate-instance_method">
626
+
627
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>on_accelerate</strong> {|Events::Acceleration| ... }
628
+
629
+
630
+
631
+
632
+
633
+ </h3><div class="docstring">
634
+ <div class="discussion">
635
+
636
+ <p>Starts listening for accelerometer events on the receiver.</p>
637
+
638
+
639
+ </div>
640
+ </div>
641
+ <div class="tags">
642
+
643
+ <p class="tag_title">Yields:</p>
644
+ <ul class="yield">
645
+
646
+ <li>
647
+
648
+
649
+ <span class='type'>(<tt><span class='object_link'><a href="Events/Acceleration.html" title="MG::Events::Acceleration (class)">Events::Acceleration</a></span></tt>)</span>
650
+
651
+
652
+
653
+ &mdash;
654
+ <div class='inline'>
655
+ <p>the given block will be yield when an accelerometer event is received from
656
+ the device.</p>
657
+ </div>
658
+
659
+ </li>
660
+
661
+ </ul>
662
+ <p class="tag_title">Returns:</p>
663
+ <ul class="return">
664
+
665
+ <li>
666
+
667
+
668
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
669
+
670
+
671
+
672
+ &mdash;
673
+ <div class='inline'>
674
+ <p>the receiver.</p>
675
+ </div>
676
+
677
+ </li>
678
+
679
+ </ul>
680
+
681
+ </div><table class="source_code">
682
+ <tr>
683
+ <td>
684
+ <pre class="lines">
685
+
686
+
687
+ 235</pre>
688
+ </td>
689
+ <td>
690
+ <pre class="code"><span class="info file"># File 'motion-game', line 235</span>
691
+
692
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_accelerate'>on_accelerate</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
693
+ </td>
694
+ </tr>
695
+ </table>
696
+ </div>
697
+
698
+ <div class="method_details ">
699
+ <h3 class="signature " id="on_contact_begin-instance_method">
700
+
701
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>on_contact_begin</strong> {|Events::PhysicsContact| ... }
702
+
703
+
704
+
705
+
706
+
707
+ </h3><div class="docstring">
708
+ <div class="discussion">
709
+
710
+ <p>Starts listening for contact begin events from the physics engine.</p>
711
+
712
+
713
+ </div>
714
+ </div>
715
+ <div class="tags">
716
+
717
+ <p class="tag_title">Yields:</p>
718
+ <ul class="yield">
719
+
720
+ <li>
721
+
722
+
723
+ <span class='type'>(<tt>Events::PhysicsContact</tt>)</span>
724
+
725
+
726
+
727
+ &mdash;
728
+ <div class='inline'>
729
+ <p>the given block will be yield when a contact event is received from the
730
+ physics engine.</p>
731
+ </div>
732
+
733
+ </li>
734
+
735
+ </ul>
736
+ <p class="tag_title">Returns:</p>
737
+ <ul class="return">
738
+
739
+ <li>
740
+
741
+
742
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
743
+
744
+
745
+
746
+ &mdash;
747
+ <div class='inline'>
748
+ <p>the receiver.</p>
749
+ </div>
750
+
751
+ </li>
752
+
753
+ </ul>
754
+
755
+ </div><table class="source_code">
756
+ <tr>
757
+ <td>
758
+ <pre class="lines">
759
+
760
+
761
+ 241</pre>
762
+ </td>
763
+ <td>
764
+ <pre class="code"><span class="info file"># File 'motion-game', line 241</span>
765
+
766
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_contact_begin'>on_contact_begin</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
767
+ </td>
768
+ </tr>
769
+ </table>
770
+ </div>
771
+
772
+ <div class="method_details ">
773
+ <h3 class="signature " id="on_touch_begin-instance_method">
774
+
775
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>on_touch_begin</strong> {|Events::Touch| ... }
776
+
777
+
778
+
779
+
780
+
781
+ </h3><div class="docstring">
782
+ <div class="discussion">
783
+
784
+ <p>Starts listening for touch begin events on the receiver.</p>
785
+
786
+
787
+ </div>
788
+ </div>
789
+ <div class="tags">
790
+
791
+ <p class="tag_title">Yields:</p>
792
+ <ul class="yield">
793
+
794
+ <li>
795
+
796
+
797
+ <span class='type'>(<tt><span class='object_link'><a href="Events/Touch.html" title="MG::Events::Touch (class)">Events::Touch</a></span></tt>)</span>
798
+
799
+
800
+
801
+ &mdash;
802
+ <div class='inline'>
803
+ <p>the given block will be yield when a touch begin event is received.</p>
804
+ </div>
805
+
806
+ </li>
807
+
808
+ </ul>
809
+ <p class="tag_title">Returns:</p>
810
+ <ul class="return">
811
+
812
+ <li>
813
+
814
+
815
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
816
+
817
+
818
+
819
+ &mdash;
820
+ <div class='inline'>
821
+ <p>the receiver.</p>
822
+ </div>
823
+
824
+ </li>
825
+
826
+ </ul>
827
+
828
+ </div><table class="source_code">
829
+ <tr>
830
+ <td>
831
+ <pre class="lines">
832
+
833
+
834
+ 229</pre>
835
+ </td>
836
+ <td>
837
+ <pre class="code"><span class="info file"># File 'motion-game', line 229</span>
838
+
839
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_touch_begin'>on_touch_begin</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
840
+ </td>
841
+ </tr>
842
+ </table>
843
+ </div>
844
+
845
+ <div class="method_details ">
846
+ <h3 class="signature " id="schedule-instance_method">
847
+
848
+ - (<tt>String</tt>) <strong>schedule</strong>(delay, repeat = 0, interval = 0) {|Float| ... }
849
+
850
+
851
+
852
+
853
+
854
+ </h3><div class="docstring">
855
+ <div class="discussion">
856
+
857
+ <p>Schedules a given block for execution.</p>
858
+
859
+
860
+ </div>
861
+ </div>
862
+ <div class="tags">
863
+ <p class="tag_title">Parameters:</p>
864
+ <ul class="param">
865
+
866
+ <li>
867
+
868
+ <span class='name'>delay</span>
869
+
870
+
871
+ <span class='type'>(<tt>Float</tt>)</span>
872
+
873
+
874
+
875
+ &mdash;
876
+ <div class='inline'>
877
+ <p>the duration of the block, in seconds.</p>
878
+ </div>
879
+
880
+ </li>
881
+
882
+ <li>
883
+
884
+ <span class='name'>repeat</span>
885
+
886
+
887
+ <span class='type'>(<tt>Integer</tt>)</span>
888
+
889
+
890
+ <em class="default">(defaults to: <tt>0</tt>)</em>
891
+
892
+
893
+ &mdash;
894
+ <div class='inline'>
895
+ <p>the number of times the block should be repeated.</p>
896
+ </div>
897
+
898
+ </li>
899
+
900
+ <li>
901
+
902
+ <span class='name'>interval</span>
903
+
904
+
905
+ <span class='type'>(<tt>Float</tt>)</span>
906
+
907
+
908
+ <em class="default">(defaults to: <tt>0</tt>)</em>
909
+
910
+
911
+ &mdash;
912
+ <div class='inline'>
913
+ <p>the interval between repetitions, in seconds.</p>
914
+ </div>
915
+
916
+ </li>
917
+
918
+ </ul>
919
+
920
+ <p class="tag_title">Yields:</p>
921
+ <ul class="yield">
922
+
923
+ <li>
924
+
925
+
926
+ <span class='type'>(<tt>Float</tt>)</span>
927
+
928
+
929
+
930
+ &mdash;
931
+ <div class='inline'>
932
+ <p>the given block will be yield with the delta value, in seconds.</p>
933
+ </div>
934
+
935
+ </li>
936
+
937
+ </ul>
938
+ <p class="tag_title">Returns:</p>
939
+ <ul class="return">
940
+
941
+ <li>
942
+
943
+
944
+ <span class='type'>(<tt>String</tt>)</span>
945
+
946
+
947
+
948
+ &mdash;
949
+ <div class='inline'>
950
+ <p>a token representing the task that can be passed to <span class='object_link'><a href="#unschedule-instance_method" title="MG::Scene#unschedule (method)">#unschedule</a></span> when
951
+ needed.</p>
952
+ </div>
953
+
954
+ </li>
955
+
956
+ </ul>
957
+
958
+ </div><table class="source_code">
959
+ <tr>
960
+ <td>
961
+ <pre class="lines">
962
+
963
+
964
+ 214</pre>
965
+ </td>
966
+ <td>
967
+ <pre class="code"><span class="info file"># File 'motion-game', line 214</span>
968
+
969
+ <span class='kw'>def</span> <span class='id identifier rubyid_schedule'>schedule</span><span class='lparen'>(</span><span class='id identifier rubyid_delay'>delay</span><span class='comma'>,</span> <span class='id identifier rubyid_repeat'>repeat</span><span class='op'>=</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
970
+ </td>
971
+ </tr>
972
+ </table>
973
+ </div>
974
+
975
+ <div class="method_details ">
976
+ <h3 class="signature " id="start_update-instance_method">
977
+
978
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>start_update</strong>
979
+
980
+
981
+
982
+
983
+
984
+ </h3><div class="docstring">
985
+ <div class="discussion">
986
+
987
+ <p>Starts the update loop. The <code>#update</code> method will be called on
988
+ this object for every frame.</p>
989
+
990
+
991
+ </div>
992
+ </div>
993
+ <div class="tags">
994
+
995
+ <p class="tag_title">Returns:</p>
996
+ <ul class="return">
997
+
998
+ <li>
999
+
1000
+
1001
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
1002
+
1003
+
1004
+
1005
+ &mdash;
1006
+ <div class='inline'>
1007
+ <p>the receiver.</p>
1008
+ </div>
1009
+
1010
+ </li>
1011
+
1012
+ </ul>
1013
+
1014
+ </div><table class="source_code">
1015
+ <tr>
1016
+ <td>
1017
+ <pre class="lines">
1018
+
1019
+
1020
+ 192</pre>
1021
+ </td>
1022
+ <td>
1023
+ <pre class="code"><span class="info file"># File 'motion-game', line 192</span>
1024
+
1025
+ <span class='kw'>def</span> <span class='id identifier rubyid_start_update'>start_update</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1026
+ </td>
1027
+ </tr>
1028
+ </table>
1029
+ </div>
1030
+
1031
+ <div class="method_details ">
1032
+ <h3 class="signature " id="stop_update-instance_method">
1033
+
1034
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>stop_update</strong>
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+ </h3><div class="docstring">
1041
+ <div class="discussion">
1042
+
1043
+ <p>Stops the update loop. The <code>#update</code> method will no longer be
1044
+ called on this object.</p>
1045
+
1046
+
1047
+ </div>
1048
+ </div>
1049
+ <div class="tags">
1050
+
1051
+ <p class="tag_title">Returns:</p>
1052
+ <ul class="return">
1053
+
1054
+ <li>
1055
+
1056
+
1057
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
1058
+
1059
+
1060
+
1061
+ &mdash;
1062
+ <div class='inline'>
1063
+ <p>the receiver.</p>
1064
+ </div>
1065
+
1066
+ </li>
1067
+
1068
+ </ul>
1069
+
1070
+ </div><table class="source_code">
1071
+ <tr>
1072
+ <td>
1073
+ <pre class="lines">
1074
+
1075
+
1076
+ 197</pre>
1077
+ </td>
1078
+ <td>
1079
+ <pre class="code"><span class="info file"># File 'motion-game', line 197</span>
1080
+
1081
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop_update'>stop_update</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1082
+ </td>
1083
+ </tr>
1084
+ </table>
1085
+ </div>
1086
+
1087
+ <div class="method_details ">
1088
+ <h3 class="signature " id="unschedule-instance_method">
1089
+
1090
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>unschedule</strong>(key)
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+ </h3><div class="docstring">
1097
+ <div class="discussion">
1098
+
1099
+ <p>Unschedules a task that&#39;s currently running.</p>
1100
+
1101
+
1102
+ </div>
1103
+ </div>
1104
+ <div class="tags">
1105
+ <p class="tag_title">Parameters:</p>
1106
+ <ul class="param">
1107
+
1108
+ <li>
1109
+
1110
+ <span class='name'>key</span>
1111
+
1112
+
1113
+ <span class='type'>(<tt>String</tt>)</span>
1114
+
1115
+
1116
+
1117
+ &mdash;
1118
+ <div class='inline'>
1119
+ <p>a token representing the task to unschedule, returned by <span class='object_link'><a href="#schedule-instance_method" title="MG::Scene#schedule (method)">#schedule</a></span>.</p>
1120
+ </div>
1121
+
1122
+ </li>
1123
+
1124
+ </ul>
1125
+
1126
+ <p class="tag_title">Returns:</p>
1127
+ <ul class="return">
1128
+
1129
+ <li>
1130
+
1131
+
1132
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
1133
+
1134
+
1135
+
1136
+ &mdash;
1137
+ <div class='inline'>
1138
+ <p>the receiver.</p>
1139
+ </div>
1140
+
1141
+ </li>
1142
+
1143
+ </ul>
1144
+
1145
+ </div><table class="source_code">
1146
+ <tr>
1147
+ <td>
1148
+ <pre class="lines">
1149
+
1150
+
1151
+ 220</pre>
1152
+ </td>
1153
+ <td>
1154
+ <pre class="code"><span class="info file"># File 'motion-game', line 220</span>
1155
+
1156
+ <span class='kw'>def</span> <span class='id identifier rubyid_unschedule'>unschedule</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1157
+ </td>
1158
+ </tr>
1159
+ </table>
1160
+ </div>
1161
+
1162
+ <div class="method_details ">
1163
+ <h3 class="signature " id="update-instance_method">
1164
+
1165
+ - (<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>) <strong>update</strong>(delta)
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+ </h3><div class="docstring">
1172
+ <div class="discussion">
1173
+
1174
+ <p>The update loop method. Subclasses can provide a custom implementation of
1175
+ this method. The default implementation is empty.</p>
1176
+
1177
+
1178
+ </div>
1179
+ </div>
1180
+ <div class="tags">
1181
+ <p class="tag_title">Parameters:</p>
1182
+ <ul class="param">
1183
+
1184
+ <li>
1185
+
1186
+ <span class='name'>delta</span>
1187
+
1188
+
1189
+ <span class='type'>(<tt>Float</tt>)</span>
1190
+
1191
+
1192
+
1193
+ &mdash;
1194
+ <div class='inline'>
1195
+ <p>a value representing the amount of time, in seconds, since the last time
1196
+ this method was called.</p>
1197
+ </div>
1198
+
1199
+ </li>
1200
+
1201
+ </ul>
1202
+
1203
+ <p class="tag_title">Returns:</p>
1204
+ <ul class="return">
1205
+
1206
+ <li>
1207
+
1208
+
1209
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
1210
+
1211
+
1212
+
1213
+ &mdash;
1214
+ <div class='inline'>
1215
+ <p>the receiver.</p>
1216
+ </div>
1217
+
1218
+ </li>
1219
+
1220
+ </ul>
1221
+
1222
+ </div><table class="source_code">
1223
+ <tr>
1224
+ <td>
1225
+ <pre class="lines">
1226
+
1227
+
1228
+ 204</pre>
1229
+ </td>
1230
+ <td>
1231
+ <pre class="code"><span class="info file"># File 'motion-game', line 204</span>
1232
+
1233
+ <span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_delta'>delta</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1234
+ </td>
1235
+ </tr>
1236
+ </table>
1237
+ </div>
1238
+
1239
+ </div>
1240
+
1241
+ </div>
1242
+
1243
+ <div id="footer">
1244
+ Generated on Thu Sep 3 15:12:07 2015 by
1245
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1246
+ 0.8.7.6 (ruby-2.0.0).
1247
+ </div>
1248
+
1249
+ </body>
1250
+ </html>