motion-game 1.1.7 → 1.1.7.1
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.
- checksums.yaml +4 -4
- data/.yardopts +2 -0
- data/build/android/motion-cocos.jar +0 -0
- metadata +2 -66
- data/doc/MG.html +0 -131
- data/doc/MG/Action.html +0 -402
- data/doc/MG/Animate.html +0 -281
- data/doc/MG/Application.html +0 -335
- data/doc/MG/Audio.html +0 -1268
- data/doc/MG/Blink.html +0 -257
- data/doc/MG/Button.html +0 -725
- data/doc/MG/Color.html +0 -535
- data/doc/MG/DelayTime.html +0 -239
- data/doc/MG/Director.html +0 -1301
- data/doc/MG/Draw.html +0 -813
- data/doc/MG/Events.html +0 -129
- data/doc/MG/Events/Acceleration.html +0 -505
- data/doc/MG/Events/Touch.html +0 -235
- data/doc/MG/FadeIn.html +0 -240
- data/doc/MG/FadeOut.html +0 -240
- data/doc/MG/FadeTo.html +0 -256
- data/doc/MG/File.html +0 -219
- data/doc/MG/Follow.html +0 -241
- data/doc/MG/JumpBy.html +0 -292
- data/doc/MG/JumpTo.html +0 -287
- data/doc/MG/Layout.html +0 -516
- data/doc/MG/List.html +0 -1053
- data/doc/MG/Menu.html +0 -458
- data/doc/MG/MoveBy.html +0 -259
- data/doc/MG/MoveTo.html +0 -257
- data/doc/MG/Node.html +0 -2013
- data/doc/MG/Parallax.html +0 -297
- data/doc/MG/Particle.html +0 -1224
- data/doc/MG/Point.html +0 -543
- data/doc/MG/Repeat.html +0 -257
- data/doc/MG/RepeatForever.html +0 -239
- data/doc/MG/RotateBy.html +0 -259
- data/doc/MG/RotateTo.html +0 -257
- data/doc/MG/ScaleBy.html +0 -255
- data/doc/MG/ScaleTo.html +0 -255
- data/doc/MG/Scene.html +0 -1544
- data/doc/MG/Scroll.html +0 -533
- data/doc/MG/Sequence.html +0 -241
- data/doc/MG/Size.html +0 -741
- data/doc/MG/SkewBy.html +0 -273
- data/doc/MG/SkewTo.html +0 -273
- data/doc/MG/Slider.html +0 -338
- data/doc/MG/Spawn.html +0 -239
- data/doc/MG/Speed.html +0 -259
- data/doc/MG/Sprite.html +0 -2591
- data/doc/MG/Text.html +0 -921
- data/doc/MG/TintBy.html +0 -272
- data/doc/MG/TintTo.html +0 -274
- data/doc/MG/Web.html +0 -831
- data/doc/MG/Widget.html +0 -552
- data/doc/_index.html +0 -574
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -481
- data/doc/file.README.html +0 -192
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -192
- data/doc/js/app.js +0 -243
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1635
- data/doc/top-level-namespace.html +0 -112
data/doc/MG/Scene.html
DELETED
@@ -1,1544 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: MG::Scene
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.5
|
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
|
-
pathId = "MG::Scene";
|
19
|
-
relpath = '../';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="../class_list.html"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="../_index.html">Index (S)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Scene</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="../class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<iframe id="search_frame" src="../class_list.html"></iframe>
|
63
|
-
|
64
|
-
<div id="content"><h1>Class: MG::Scene
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
</h1>
|
69
|
-
<div class="box_info">
|
70
|
-
|
71
|
-
<dl>
|
72
|
-
<dt>Inherits:</dt>
|
73
|
-
<dd>
|
74
|
-
<span class="inheritName"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></span>
|
75
|
-
|
76
|
-
<ul class="fullTree">
|
77
|
-
<li>Object</li>
|
78
|
-
|
79
|
-
<li class="next"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></li>
|
80
|
-
|
81
|
-
<li class="next">MG::Scene</li>
|
82
|
-
|
83
|
-
</ul>
|
84
|
-
<a href="#" class="inheritanceTree">show all</a>
|
85
|
-
|
86
|
-
</dd>
|
87
|
-
</dl>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<dl>
|
100
|
-
<dt>Defined in:</dt>
|
101
|
-
<dd>motion-game</dd>
|
102
|
-
</dl>
|
103
|
-
|
104
|
-
</div>
|
105
|
-
|
106
|
-
<h2>Overview</h2><div class="docstring">
|
107
|
-
<div class="discussion">
|
108
|
-
|
109
|
-
<p>This class represents a scene, an independent screen or stage of the
|
110
|
-
application workflow. A scene is responsible for handling events from the
|
111
|
-
device, providing a physics world for the sprites, and also starting the
|
112
|
-
game loop. An application must have at least one scene, and the
|
113
|
-
<code>Scene</code> class is designed to be subclassed.</p>
|
114
|
-
|
115
|
-
|
116
|
-
</div>
|
117
|
-
</div>
|
118
|
-
<div class="tags">
|
119
|
-
|
120
|
-
|
121
|
-
</div>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<h2>Properties <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
126
|
-
<ul class="summary">
|
127
|
-
|
128
|
-
<li class="public ">
|
129
|
-
<span class="summary_signature">
|
130
|
-
|
131
|
-
<a href="#debug_physics%3F-instance_method" title="#debug_physics? (instance method)">#<strong>debug_physics?</strong> ⇒ Boolean </a>
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
</span>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
<span class="summary_desc"><div class='inline'>
|
149
|
-
<p>Whether the physics engine should draw debug lines.</p>
|
150
|
-
</div></span>
|
151
|
-
|
152
|
-
</li>
|
153
|
-
|
154
|
-
|
155
|
-
<li class="public ">
|
156
|
-
<span class="summary_signature">
|
157
|
-
|
158
|
-
<a href="#gravity-instance_method" title="#gravity (instance method)">#<strong>gravity</strong> ⇒ Point </a>
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
</span>
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
<span class="summary_desc"><div class='inline'>
|
176
|
-
<p>The gravity of the scene's physics world.</p>
|
177
|
-
</div></span>
|
178
|
-
|
179
|
-
</li>
|
180
|
-
|
181
|
-
|
182
|
-
</ul>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
|
189
|
-
<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>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<h2>
|
194
|
-
Constructors
|
195
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
196
|
-
</h2>
|
197
|
-
|
198
|
-
<ul class="summary">
|
199
|
-
|
200
|
-
<li class="public ">
|
201
|
-
<span class="summary_signature">
|
202
|
-
|
203
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Scene </a>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
</span>
|
208
|
-
|
209
|
-
|
210
|
-
<span class="note title constructor">constructor</span>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
<span class="summary_desc"><div class='inline'>
|
220
|
-
<p>The default initializer.</p>
|
221
|
-
</div></span>
|
222
|
-
|
223
|
-
</li>
|
224
|
-
|
225
|
-
|
226
|
-
</ul>
|
227
|
-
|
228
|
-
<h2>
|
229
|
-
Update Loop
|
230
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
231
|
-
</h2>
|
232
|
-
|
233
|
-
<ul class="summary">
|
234
|
-
|
235
|
-
<li class="public ">
|
236
|
-
<span class="summary_signature">
|
237
|
-
|
238
|
-
<a href="#schedule-instance_method" title="#schedule (instance method)">#<strong>schedule</strong>(delay, repeat = 0, interval = 0) {|Float| ... } ⇒ String </a>
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
</span>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
<span class="summary_desc"><div class='inline'>
|
253
|
-
<p>Schedules a given block for execution.</p>
|
254
|
-
</div></span>
|
255
|
-
|
256
|
-
</li>
|
257
|
-
|
258
|
-
|
259
|
-
<li class="public ">
|
260
|
-
<span class="summary_signature">
|
261
|
-
|
262
|
-
<a href="#start_update-instance_method" title="#start_update (instance method)">#<strong>start_update</strong> ⇒ Scene </a>
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
</span>
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
<span class="summary_desc"><div class='inline'>
|
277
|
-
<p>Starts the update loop.</p>
|
278
|
-
</div></span>
|
279
|
-
|
280
|
-
</li>
|
281
|
-
|
282
|
-
|
283
|
-
<li class="public ">
|
284
|
-
<span class="summary_signature">
|
285
|
-
|
286
|
-
<a href="#stop_update-instance_method" title="#stop_update (instance method)">#<strong>stop_update</strong> ⇒ Scene </a>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
</span>
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
<span class="summary_desc"><div class='inline'>
|
301
|
-
<p>Stops the update loop.</p>
|
302
|
-
</div></span>
|
303
|
-
|
304
|
-
</li>
|
305
|
-
|
306
|
-
|
307
|
-
<li class="public ">
|
308
|
-
<span class="summary_signature">
|
309
|
-
|
310
|
-
<a href="#unschedule-instance_method" title="#unschedule (instance method)">#<strong>unschedule</strong>(key) ⇒ Scene </a>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
</span>
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
<span class="summary_desc"><div class='inline'>
|
325
|
-
<p>Unschedules a task that's currently running.</p>
|
326
|
-
</div></span>
|
327
|
-
|
328
|
-
</li>
|
329
|
-
|
330
|
-
|
331
|
-
<li class="public ">
|
332
|
-
<span class="summary_signature">
|
333
|
-
|
334
|
-
<a href="#update-instance_method" title="#update (instance method)">#<strong>update</strong>(delta) ⇒ Scene </a>
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
</span>
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
<span class="summary_desc"><div class='inline'>
|
349
|
-
<p>The update loop method.</p>
|
350
|
-
</div></span>
|
351
|
-
|
352
|
-
</li>
|
353
|
-
|
354
|
-
|
355
|
-
</ul>
|
356
|
-
|
357
|
-
<h2>
|
358
|
-
Events
|
359
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
360
|
-
</h2>
|
361
|
-
|
362
|
-
<ul class="summary">
|
363
|
-
|
364
|
-
<li class="public ">
|
365
|
-
<span class="summary_signature">
|
366
|
-
|
367
|
-
<a href="#on_accelerate-instance_method" title="#on_accelerate (instance method)">#<strong>on_accelerate</strong> {|Events::Acceleration| ... } ⇒ Scene </a>
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
</span>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
<span class="summary_desc"><div class='inline'>
|
382
|
-
<p>Starts listening for accelerometer events on the receiver.</p>
|
383
|
-
</div></span>
|
384
|
-
|
385
|
-
</li>
|
386
|
-
|
387
|
-
|
388
|
-
<li class="public ">
|
389
|
-
<span class="summary_signature">
|
390
|
-
|
391
|
-
<a href="#on_contact_begin-instance_method" title="#on_contact_begin (instance method)">#<strong>on_contact_begin</strong> {|Events::PhysicsContact| ... } ⇒ Scene </a>
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
</span>
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
<span class="summary_desc"><div class='inline'>
|
406
|
-
<p>Starts listening for contact begin events from the physics engine.</p>
|
407
|
-
</div></span>
|
408
|
-
|
409
|
-
</li>
|
410
|
-
|
411
|
-
|
412
|
-
<li class="public ">
|
413
|
-
<span class="summary_signature">
|
414
|
-
|
415
|
-
<a href="#on_touch_begin-instance_method" title="#on_touch_begin (instance method)">#<strong>on_touch_begin</strong> {|Events::Touch| ... } ⇒ Scene </a>
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
</span>
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
<span class="summary_desc"><div class='inline'>
|
430
|
-
<p>Starts listening for touch begin events on the receiver.</p>
|
431
|
-
</div></span>
|
432
|
-
|
433
|
-
</li>
|
434
|
-
|
435
|
-
|
436
|
-
<li class="public ">
|
437
|
-
<span class="summary_signature">
|
438
|
-
|
439
|
-
<a href="#on_touch_cancel-instance_method" title="#on_touch_cancel (instance method)">#<strong>on_touch_cancel</strong> {|Events::Touch| ... } ⇒ Scene </a>
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
</span>
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
<span class="summary_desc"><div class='inline'>
|
454
|
-
<p>Starts listening for touch cancel events on the receiver.</p>
|
455
|
-
</div></span>
|
456
|
-
|
457
|
-
</li>
|
458
|
-
|
459
|
-
|
460
|
-
<li class="public ">
|
461
|
-
<span class="summary_signature">
|
462
|
-
|
463
|
-
<a href="#on_touch_end-instance_method" title="#on_touch_end (instance method)">#<strong>on_touch_end</strong> {|Events::Touch| ... } ⇒ Scene </a>
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
</span>
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
<span class="summary_desc"><div class='inline'>
|
478
|
-
<p>Starts listening for touch end events on the receiver.</p>
|
479
|
-
</div></span>
|
480
|
-
|
481
|
-
</li>
|
482
|
-
|
483
|
-
|
484
|
-
<li class="public ">
|
485
|
-
<span class="summary_signature">
|
486
|
-
|
487
|
-
<a href="#on_touch_move-instance_method" title="#on_touch_move (instance method)">#<strong>on_touch_move</strong> {|Events::Touch| ... } ⇒ Scene </a>
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
</span>
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
<span class="summary_desc"><div class='inline'>
|
502
|
-
<p>Starts listening for touch move events on the receiver.</p>
|
503
|
-
</div></span>
|
504
|
-
|
505
|
-
</li>
|
506
|
-
|
507
|
-
|
508
|
-
</ul>
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
|
521
|
-
<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>, <span class='object_link'><a href="Node.html#run_action-instance_method" title="MG::Node#run_action (method)">#run_action</a></span>, <span class='object_link'><a href="Node.html#stop_action-instance_method" title="MG::Node#stop_action (method)">#stop_action</a></span>, <span class='object_link'><a href="Node.html#stop_all_actions-instance_method" title="MG::Node#stop_all_actions (method)">#stop_all_actions</a></span></p>
|
522
|
-
<div id="constructor_details" class="method_details_list">
|
523
|
-
<h2>Constructor Details</h2>
|
524
|
-
|
525
|
-
<div class="method_details first">
|
526
|
-
<h3 class="signature first" id="initialize-instance_method">
|
527
|
-
|
528
|
-
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
</h3><div class="docstring">
|
535
|
-
<div class="discussion">
|
536
|
-
|
537
|
-
<p>The default initializer. Subclasses can construct the scene interface in
|
538
|
-
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
|
539
|
-
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>
|
540
|
-
|
541
|
-
|
542
|
-
</div>
|
543
|
-
</div>
|
544
|
-
<div class="tags">
|
545
|
-
|
546
|
-
|
547
|
-
</div><table class="source_code">
|
548
|
-
<tr>
|
549
|
-
<td>
|
550
|
-
<pre class="lines">
|
551
|
-
|
552
|
-
|
553
|
-
551</pre>
|
554
|
-
</td>
|
555
|
-
<td>
|
556
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 551</span>
|
557
|
-
|
558
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
559
|
-
</td>
|
560
|
-
</tr>
|
561
|
-
</table>
|
562
|
-
</div>
|
563
|
-
|
564
|
-
</div>
|
565
|
-
|
566
|
-
<div id="instance_attr_details" class="attr_details">
|
567
|
-
<h2>Instance Attribute Details</h2>
|
568
|
-
|
569
|
-
|
570
|
-
<span id="debug_physics?=-instance_method"></span>
|
571
|
-
<div class="method_details first">
|
572
|
-
<h3 class="signature first" id="debug_physics?-instance_method">
|
573
|
-
|
574
|
-
#<strong>debug_physics?</strong> ⇒ <tt>Boolean</tt>
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
</h3><div class="docstring">
|
581
|
-
<div class="discussion">
|
582
|
-
|
583
|
-
<p>Returns whether the physics engine should draw debug lines.</p>
|
584
|
-
|
585
|
-
|
586
|
-
</div>
|
587
|
-
</div>
|
588
|
-
<div class="tags">
|
589
|
-
|
590
|
-
<p class="tag_title">Returns:</p>
|
591
|
-
<ul class="return">
|
592
|
-
|
593
|
-
<li>
|
594
|
-
|
595
|
-
|
596
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
—
|
601
|
-
<div class='inline'>
|
602
|
-
<p>whether the physics engine should draw debug lines.</p>
|
603
|
-
</div>
|
604
|
-
|
605
|
-
</li>
|
606
|
-
|
607
|
-
</ul>
|
608
|
-
|
609
|
-
</div><table class="source_code">
|
610
|
-
<tr>
|
611
|
-
<td>
|
612
|
-
<pre class="lines">
|
613
|
-
|
614
|
-
|
615
|
-
635
|
616
|
-
636
|
617
|
-
637</pre>
|
618
|
-
</td>
|
619
|
-
<td>
|
620
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 635</span>
|
621
|
-
|
622
|
-
def debug_physics?
|
623
|
-
@debug_physics?
|
624
|
-
end</pre>
|
625
|
-
</td>
|
626
|
-
</tr>
|
627
|
-
</table>
|
628
|
-
</div>
|
629
|
-
|
630
|
-
|
631
|
-
<span id="gravity=-instance_method"></span>
|
632
|
-
<div class="method_details ">
|
633
|
-
<h3 class="signature " id="gravity-instance_method">
|
634
|
-
|
635
|
-
#<strong>gravity</strong> ⇒ <tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
</h3><div class="docstring">
|
642
|
-
<div class="discussion">
|
643
|
-
|
644
|
-
<p>Returns the gravity of the scene's physics world.</p>
|
645
|
-
|
646
|
-
|
647
|
-
</div>
|
648
|
-
</div>
|
649
|
-
<div class="tags">
|
650
|
-
|
651
|
-
<p class="tag_title">Returns:</p>
|
652
|
-
<ul class="return">
|
653
|
-
|
654
|
-
<li>
|
655
|
-
|
656
|
-
|
657
|
-
<span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
—
|
662
|
-
<div class='inline'>
|
663
|
-
<p>the gravity of the scene's physics world.</p>
|
664
|
-
</div>
|
665
|
-
|
666
|
-
</li>
|
667
|
-
|
668
|
-
</ul>
|
669
|
-
|
670
|
-
</div><table class="source_code">
|
671
|
-
<tr>
|
672
|
-
<td>
|
673
|
-
<pre class="lines">
|
674
|
-
|
675
|
-
|
676
|
-
632
|
677
|
-
633
|
678
|
-
634</pre>
|
679
|
-
</td>
|
680
|
-
<td>
|
681
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 632</span>
|
682
|
-
|
683
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_gravity'>gravity</span>
|
684
|
-
<span class='ivar'>@gravity</span>
|
685
|
-
<span class='kw'>end</span></pre>
|
686
|
-
</td>
|
687
|
-
</tr>
|
688
|
-
</table>
|
689
|
-
</div>
|
690
|
-
|
691
|
-
</div>
|
692
|
-
|
693
|
-
|
694
|
-
<div id="instance_method_details" class="method_details_list">
|
695
|
-
<h2>Instance Method Details</h2>
|
696
|
-
|
697
|
-
|
698
|
-
<div class="method_details first">
|
699
|
-
<h3 class="signature first" id="on_accelerate-instance_method">
|
700
|
-
|
701
|
-
#<strong>on_accelerate</strong> {|Events::Acceleration| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
</h3><div class="docstring">
|
708
|
-
<div class="discussion">
|
709
|
-
|
710
|
-
<p>Starts listening for accelerometer events on the receiver.</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><span class='object_link'><a href="Events/Acceleration.html" title="MG::Events::Acceleration (class)">Events::Acceleration</a></span></tt>)</span>
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
—
|
728
|
-
<div class='inline'>
|
729
|
-
<p>the given block will be yield when an accelerometer event is received from
|
730
|
-
the device.</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
|
-
—
|
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
|
-
620</pre>
|
762
|
-
</td>
|
763
|
-
<td>
|
764
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 620</span>
|
765
|
-
|
766
|
-
<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>
|
767
|
-
</td>
|
768
|
-
</tr>
|
769
|
-
</table>
|
770
|
-
</div>
|
771
|
-
|
772
|
-
<div class="method_details ">
|
773
|
-
<h3 class="signature " id="on_contact_begin-instance_method">
|
774
|
-
|
775
|
-
#<strong>on_contact_begin</strong> {|Events::PhysicsContact| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
</h3><div class="docstring">
|
782
|
-
<div class="discussion">
|
783
|
-
|
784
|
-
<p>Starts listening for contact begin events from the physics engine.</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>Events::PhysicsContact</tt>)</span>
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
—
|
802
|
-
<div class='inline'>
|
803
|
-
<p>the given block will be yield when a contact event is received from the
|
804
|
-
physics engine.</p>
|
805
|
-
</div>
|
806
|
-
|
807
|
-
</li>
|
808
|
-
|
809
|
-
</ul>
|
810
|
-
<p class="tag_title">Returns:</p>
|
811
|
-
<ul class="return">
|
812
|
-
|
813
|
-
<li>
|
814
|
-
|
815
|
-
|
816
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
—
|
821
|
-
<div class='inline'>
|
822
|
-
<p>the receiver.</p>
|
823
|
-
</div>
|
824
|
-
|
825
|
-
</li>
|
826
|
-
|
827
|
-
</ul>
|
828
|
-
|
829
|
-
</div><table class="source_code">
|
830
|
-
<tr>
|
831
|
-
<td>
|
832
|
-
<pre class="lines">
|
833
|
-
|
834
|
-
|
835
|
-
626</pre>
|
836
|
-
</td>
|
837
|
-
<td>
|
838
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 626</span>
|
839
|
-
|
840
|
-
<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>
|
841
|
-
</td>
|
842
|
-
</tr>
|
843
|
-
</table>
|
844
|
-
</div>
|
845
|
-
|
846
|
-
<div class="method_details ">
|
847
|
-
<h3 class="signature " id="on_touch_begin-instance_method">
|
848
|
-
|
849
|
-
#<strong>on_touch_begin</strong> {|Events::Touch| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
</h3><div class="docstring">
|
856
|
-
<div class="discussion">
|
857
|
-
|
858
|
-
<p>Starts listening for touch begin events on the receiver.</p>
|
859
|
-
|
860
|
-
|
861
|
-
</div>
|
862
|
-
</div>
|
863
|
-
<div class="tags">
|
864
|
-
|
865
|
-
<p class="tag_title">Yields:</p>
|
866
|
-
<ul class="yield">
|
867
|
-
|
868
|
-
<li>
|
869
|
-
|
870
|
-
|
871
|
-
<span class='type'>(<tt><span class='object_link'><a href="Events/Touch.html" title="MG::Events::Touch (class)">Events::Touch</a></span></tt>)</span>
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
—
|
876
|
-
<div class='inline'>
|
877
|
-
<p>the given block will be yield when a touch begin event is received.</p>
|
878
|
-
</div>
|
879
|
-
|
880
|
-
</li>
|
881
|
-
|
882
|
-
</ul>
|
883
|
-
<p class="tag_title">Returns:</p>
|
884
|
-
<ul class="return">
|
885
|
-
|
886
|
-
<li>
|
887
|
-
|
888
|
-
|
889
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
—
|
894
|
-
<div class='inline'>
|
895
|
-
<p>the receiver.</p>
|
896
|
-
</div>
|
897
|
-
|
898
|
-
</li>
|
899
|
-
|
900
|
-
</ul>
|
901
|
-
|
902
|
-
</div><table class="source_code">
|
903
|
-
<tr>
|
904
|
-
<td>
|
905
|
-
<pre class="lines">
|
906
|
-
|
907
|
-
|
908
|
-
596</pre>
|
909
|
-
</td>
|
910
|
-
<td>
|
911
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 596</span>
|
912
|
-
|
913
|
-
<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>
|
914
|
-
</td>
|
915
|
-
</tr>
|
916
|
-
</table>
|
917
|
-
</div>
|
918
|
-
|
919
|
-
<div class="method_details ">
|
920
|
-
<h3 class="signature " id="on_touch_cancel-instance_method">
|
921
|
-
|
922
|
-
#<strong>on_touch_cancel</strong> {|Events::Touch| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
</h3><div class="docstring">
|
929
|
-
<div class="discussion">
|
930
|
-
|
931
|
-
<p>Starts listening for touch cancel events on the receiver.</p>
|
932
|
-
|
933
|
-
|
934
|
-
</div>
|
935
|
-
</div>
|
936
|
-
<div class="tags">
|
937
|
-
|
938
|
-
<p class="tag_title">Yields:</p>
|
939
|
-
<ul class="yield">
|
940
|
-
|
941
|
-
<li>
|
942
|
-
|
943
|
-
|
944
|
-
<span class='type'>(<tt><span class='object_link'><a href="Events/Touch.html" title="MG::Events::Touch (class)">Events::Touch</a></span></tt>)</span>
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
—
|
949
|
-
<div class='inline'>
|
950
|
-
<p>the given block will be yield when a touch cancel event is received.</p>
|
951
|
-
</div>
|
952
|
-
|
953
|
-
</li>
|
954
|
-
|
955
|
-
</ul>
|
956
|
-
<p class="tag_title">Returns:</p>
|
957
|
-
<ul class="return">
|
958
|
-
|
959
|
-
<li>
|
960
|
-
|
961
|
-
|
962
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
—
|
967
|
-
<div class='inline'>
|
968
|
-
<p>the receiver.</p>
|
969
|
-
</div>
|
970
|
-
|
971
|
-
</li>
|
972
|
-
|
973
|
-
</ul>
|
974
|
-
|
975
|
-
</div><table class="source_code">
|
976
|
-
<tr>
|
977
|
-
<td>
|
978
|
-
<pre class="lines">
|
979
|
-
|
980
|
-
|
981
|
-
614</pre>
|
982
|
-
</td>
|
983
|
-
<td>
|
984
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 614</span>
|
985
|
-
|
986
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_touch_cancel'>on_touch_cancel</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
987
|
-
</td>
|
988
|
-
</tr>
|
989
|
-
</table>
|
990
|
-
</div>
|
991
|
-
|
992
|
-
<div class="method_details ">
|
993
|
-
<h3 class="signature " id="on_touch_end-instance_method">
|
994
|
-
|
995
|
-
#<strong>on_touch_end</strong> {|Events::Touch| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
</h3><div class="docstring">
|
1002
|
-
<div class="discussion">
|
1003
|
-
|
1004
|
-
<p>Starts listening for touch end events on the receiver.</p>
|
1005
|
-
|
1006
|
-
|
1007
|
-
</div>
|
1008
|
-
</div>
|
1009
|
-
<div class="tags">
|
1010
|
-
|
1011
|
-
<p class="tag_title">Yields:</p>
|
1012
|
-
<ul class="yield">
|
1013
|
-
|
1014
|
-
<li>
|
1015
|
-
|
1016
|
-
|
1017
|
-
<span class='type'>(<tt><span class='object_link'><a href="Events/Touch.html" title="MG::Events::Touch (class)">Events::Touch</a></span></tt>)</span>
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
—
|
1022
|
-
<div class='inline'>
|
1023
|
-
<p>the given block will be yield when a touch end event is received.</p>
|
1024
|
-
</div>
|
1025
|
-
|
1026
|
-
</li>
|
1027
|
-
|
1028
|
-
</ul>
|
1029
|
-
<p class="tag_title">Returns:</p>
|
1030
|
-
<ul class="return">
|
1031
|
-
|
1032
|
-
<li>
|
1033
|
-
|
1034
|
-
|
1035
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
—
|
1040
|
-
<div class='inline'>
|
1041
|
-
<p>the receiver.</p>
|
1042
|
-
</div>
|
1043
|
-
|
1044
|
-
</li>
|
1045
|
-
|
1046
|
-
</ul>
|
1047
|
-
|
1048
|
-
</div><table class="source_code">
|
1049
|
-
<tr>
|
1050
|
-
<td>
|
1051
|
-
<pre class="lines">
|
1052
|
-
|
1053
|
-
|
1054
|
-
602</pre>
|
1055
|
-
</td>
|
1056
|
-
<td>
|
1057
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 602</span>
|
1058
|
-
|
1059
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_touch_end'>on_touch_end</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1060
|
-
</td>
|
1061
|
-
</tr>
|
1062
|
-
</table>
|
1063
|
-
</div>
|
1064
|
-
|
1065
|
-
<div class="method_details ">
|
1066
|
-
<h3 class="signature " id="on_touch_move-instance_method">
|
1067
|
-
|
1068
|
-
#<strong>on_touch_move</strong> {|Events::Touch| ... } ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
</h3><div class="docstring">
|
1075
|
-
<div class="discussion">
|
1076
|
-
|
1077
|
-
<p>Starts listening for touch move events on the receiver.</p>
|
1078
|
-
|
1079
|
-
|
1080
|
-
</div>
|
1081
|
-
</div>
|
1082
|
-
<div class="tags">
|
1083
|
-
|
1084
|
-
<p class="tag_title">Yields:</p>
|
1085
|
-
<ul class="yield">
|
1086
|
-
|
1087
|
-
<li>
|
1088
|
-
|
1089
|
-
|
1090
|
-
<span class='type'>(<tt><span class='object_link'><a href="Events/Touch.html" title="MG::Events::Touch (class)">Events::Touch</a></span></tt>)</span>
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
—
|
1095
|
-
<div class='inline'>
|
1096
|
-
<p>the given block will be yield when a touch move event is received.</p>
|
1097
|
-
</div>
|
1098
|
-
|
1099
|
-
</li>
|
1100
|
-
|
1101
|
-
</ul>
|
1102
|
-
<p class="tag_title">Returns:</p>
|
1103
|
-
<ul class="return">
|
1104
|
-
|
1105
|
-
<li>
|
1106
|
-
|
1107
|
-
|
1108
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
—
|
1113
|
-
<div class='inline'>
|
1114
|
-
<p>the receiver.</p>
|
1115
|
-
</div>
|
1116
|
-
|
1117
|
-
</li>
|
1118
|
-
|
1119
|
-
</ul>
|
1120
|
-
|
1121
|
-
</div><table class="source_code">
|
1122
|
-
<tr>
|
1123
|
-
<td>
|
1124
|
-
<pre class="lines">
|
1125
|
-
|
1126
|
-
|
1127
|
-
608</pre>
|
1128
|
-
</td>
|
1129
|
-
<td>
|
1130
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 608</span>
|
1131
|
-
|
1132
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_touch_move'>on_touch_move</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1133
|
-
</td>
|
1134
|
-
</tr>
|
1135
|
-
</table>
|
1136
|
-
</div>
|
1137
|
-
|
1138
|
-
<div class="method_details ">
|
1139
|
-
<h3 class="signature " id="schedule-instance_method">
|
1140
|
-
|
1141
|
-
#<strong>schedule</strong>(delay, repeat = 0, interval = 0) {|Float| ... } ⇒ <tt>String</tt>
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
</h3><div class="docstring">
|
1148
|
-
<div class="discussion">
|
1149
|
-
|
1150
|
-
<p>Schedules a given block for execution.</p>
|
1151
|
-
|
1152
|
-
|
1153
|
-
</div>
|
1154
|
-
</div>
|
1155
|
-
<div class="tags">
|
1156
|
-
<p class="tag_title">Parameters:</p>
|
1157
|
-
<ul class="param">
|
1158
|
-
|
1159
|
-
<li>
|
1160
|
-
|
1161
|
-
<span class='name'>delay</span>
|
1162
|
-
|
1163
|
-
|
1164
|
-
<span class='type'>(<tt>Float</tt>)</span>
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
—
|
1169
|
-
<div class='inline'>
|
1170
|
-
<p>the duration of the block, in seconds.</p>
|
1171
|
-
</div>
|
1172
|
-
|
1173
|
-
</li>
|
1174
|
-
|
1175
|
-
<li>
|
1176
|
-
|
1177
|
-
<span class='name'>repeat</span>
|
1178
|
-
|
1179
|
-
|
1180
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1181
|
-
|
1182
|
-
|
1183
|
-
<em class="default">(defaults to: <tt>0</tt>)</em>
|
1184
|
-
|
1185
|
-
|
1186
|
-
—
|
1187
|
-
<div class='inline'>
|
1188
|
-
<p>the number of times the block should be repeated.</p>
|
1189
|
-
</div>
|
1190
|
-
|
1191
|
-
</li>
|
1192
|
-
|
1193
|
-
<li>
|
1194
|
-
|
1195
|
-
<span class='name'>interval</span>
|
1196
|
-
|
1197
|
-
|
1198
|
-
<span class='type'>(<tt>Float</tt>)</span>
|
1199
|
-
|
1200
|
-
|
1201
|
-
<em class="default">(defaults to: <tt>0</tt>)</em>
|
1202
|
-
|
1203
|
-
|
1204
|
-
—
|
1205
|
-
<div class='inline'>
|
1206
|
-
<p>the interval between repetitions, in seconds.</p>
|
1207
|
-
</div>
|
1208
|
-
|
1209
|
-
</li>
|
1210
|
-
|
1211
|
-
</ul>
|
1212
|
-
|
1213
|
-
<p class="tag_title">Yields:</p>
|
1214
|
-
<ul class="yield">
|
1215
|
-
|
1216
|
-
<li>
|
1217
|
-
|
1218
|
-
|
1219
|
-
<span class='type'>(<tt>Float</tt>)</span>
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
—
|
1224
|
-
<div class='inline'>
|
1225
|
-
<p>the given block will be yield with the delta value, in seconds.</p>
|
1226
|
-
</div>
|
1227
|
-
|
1228
|
-
</li>
|
1229
|
-
|
1230
|
-
</ul>
|
1231
|
-
<p class="tag_title">Returns:</p>
|
1232
|
-
<ul class="return">
|
1233
|
-
|
1234
|
-
<li>
|
1235
|
-
|
1236
|
-
|
1237
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
—
|
1242
|
-
<div class='inline'>
|
1243
|
-
<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
|
1244
|
-
needed.</p>
|
1245
|
-
</div>
|
1246
|
-
|
1247
|
-
</li>
|
1248
|
-
|
1249
|
-
</ul>
|
1250
|
-
|
1251
|
-
</div><table class="source_code">
|
1252
|
-
<tr>
|
1253
|
-
<td>
|
1254
|
-
<pre class="lines">
|
1255
|
-
|
1256
|
-
|
1257
|
-
581</pre>
|
1258
|
-
</td>
|
1259
|
-
<td>
|
1260
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 581</span>
|
1261
|
-
|
1262
|
-
<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>
|
1263
|
-
</td>
|
1264
|
-
</tr>
|
1265
|
-
</table>
|
1266
|
-
</div>
|
1267
|
-
|
1268
|
-
<div class="method_details ">
|
1269
|
-
<h3 class="signature " id="start_update-instance_method">
|
1270
|
-
|
1271
|
-
#<strong>start_update</strong> ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
</h3><div class="docstring">
|
1278
|
-
<div class="discussion">
|
1279
|
-
|
1280
|
-
<p>Starts the update loop. The <code>#update</code> method will be called on
|
1281
|
-
this object for every frame.</p>
|
1282
|
-
|
1283
|
-
|
1284
|
-
</div>
|
1285
|
-
</div>
|
1286
|
-
<div class="tags">
|
1287
|
-
|
1288
|
-
<p class="tag_title">Returns:</p>
|
1289
|
-
<ul class="return">
|
1290
|
-
|
1291
|
-
<li>
|
1292
|
-
|
1293
|
-
|
1294
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
—
|
1299
|
-
<div class='inline'>
|
1300
|
-
<p>the receiver.</p>
|
1301
|
-
</div>
|
1302
|
-
|
1303
|
-
</li>
|
1304
|
-
|
1305
|
-
</ul>
|
1306
|
-
|
1307
|
-
</div><table class="source_code">
|
1308
|
-
<tr>
|
1309
|
-
<td>
|
1310
|
-
<pre class="lines">
|
1311
|
-
|
1312
|
-
|
1313
|
-
559</pre>
|
1314
|
-
</td>
|
1315
|
-
<td>
|
1316
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 559</span>
|
1317
|
-
|
1318
|
-
<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>
|
1319
|
-
</td>
|
1320
|
-
</tr>
|
1321
|
-
</table>
|
1322
|
-
</div>
|
1323
|
-
|
1324
|
-
<div class="method_details ">
|
1325
|
-
<h3 class="signature " id="stop_update-instance_method">
|
1326
|
-
|
1327
|
-
#<strong>stop_update</strong> ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
</h3><div class="docstring">
|
1334
|
-
<div class="discussion">
|
1335
|
-
|
1336
|
-
<p>Stops the update loop. The <code>#update</code> method will no longer be
|
1337
|
-
called on this object.</p>
|
1338
|
-
|
1339
|
-
|
1340
|
-
</div>
|
1341
|
-
</div>
|
1342
|
-
<div class="tags">
|
1343
|
-
|
1344
|
-
<p class="tag_title">Returns:</p>
|
1345
|
-
<ul class="return">
|
1346
|
-
|
1347
|
-
<li>
|
1348
|
-
|
1349
|
-
|
1350
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
—
|
1355
|
-
<div class='inline'>
|
1356
|
-
<p>the receiver.</p>
|
1357
|
-
</div>
|
1358
|
-
|
1359
|
-
</li>
|
1360
|
-
|
1361
|
-
</ul>
|
1362
|
-
|
1363
|
-
</div><table class="source_code">
|
1364
|
-
<tr>
|
1365
|
-
<td>
|
1366
|
-
<pre class="lines">
|
1367
|
-
|
1368
|
-
|
1369
|
-
564</pre>
|
1370
|
-
</td>
|
1371
|
-
<td>
|
1372
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 564</span>
|
1373
|
-
|
1374
|
-
<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>
|
1375
|
-
</td>
|
1376
|
-
</tr>
|
1377
|
-
</table>
|
1378
|
-
</div>
|
1379
|
-
|
1380
|
-
<div class="method_details ">
|
1381
|
-
<h3 class="signature " id="unschedule-instance_method">
|
1382
|
-
|
1383
|
-
#<strong>unschedule</strong>(key) ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
</h3><div class="docstring">
|
1390
|
-
<div class="discussion">
|
1391
|
-
|
1392
|
-
<p>Unschedules a task that's currently running.</p>
|
1393
|
-
|
1394
|
-
|
1395
|
-
</div>
|
1396
|
-
</div>
|
1397
|
-
<div class="tags">
|
1398
|
-
<p class="tag_title">Parameters:</p>
|
1399
|
-
<ul class="param">
|
1400
|
-
|
1401
|
-
<li>
|
1402
|
-
|
1403
|
-
<span class='name'>key</span>
|
1404
|
-
|
1405
|
-
|
1406
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
—
|
1411
|
-
<div class='inline'>
|
1412
|
-
<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>
|
1413
|
-
</div>
|
1414
|
-
|
1415
|
-
</li>
|
1416
|
-
|
1417
|
-
</ul>
|
1418
|
-
|
1419
|
-
<p class="tag_title">Returns:</p>
|
1420
|
-
<ul class="return">
|
1421
|
-
|
1422
|
-
<li>
|
1423
|
-
|
1424
|
-
|
1425
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
—
|
1430
|
-
<div class='inline'>
|
1431
|
-
<p>the receiver.</p>
|
1432
|
-
</div>
|
1433
|
-
|
1434
|
-
</li>
|
1435
|
-
|
1436
|
-
</ul>
|
1437
|
-
|
1438
|
-
</div><table class="source_code">
|
1439
|
-
<tr>
|
1440
|
-
<td>
|
1441
|
-
<pre class="lines">
|
1442
|
-
|
1443
|
-
|
1444
|
-
587</pre>
|
1445
|
-
</td>
|
1446
|
-
<td>
|
1447
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 587</span>
|
1448
|
-
|
1449
|
-
<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>
|
1450
|
-
</td>
|
1451
|
-
</tr>
|
1452
|
-
</table>
|
1453
|
-
</div>
|
1454
|
-
|
1455
|
-
<div class="method_details ">
|
1456
|
-
<h3 class="signature " id="update-instance_method">
|
1457
|
-
|
1458
|
-
#<strong>update</strong>(delta) ⇒ <tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
</h3><div class="docstring">
|
1465
|
-
<div class="discussion">
|
1466
|
-
|
1467
|
-
<p>The update loop method. Subclasses can provide a custom implementation of
|
1468
|
-
this method. The default implementation is empty.</p>
|
1469
|
-
|
1470
|
-
|
1471
|
-
</div>
|
1472
|
-
</div>
|
1473
|
-
<div class="tags">
|
1474
|
-
<p class="tag_title">Parameters:</p>
|
1475
|
-
<ul class="param">
|
1476
|
-
|
1477
|
-
<li>
|
1478
|
-
|
1479
|
-
<span class='name'>delta</span>
|
1480
|
-
|
1481
|
-
|
1482
|
-
<span class='type'>(<tt>Float</tt>)</span>
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
—
|
1487
|
-
<div class='inline'>
|
1488
|
-
<p>a value representing the amount of time, in seconds, since the last time
|
1489
|
-
this method was called.</p>
|
1490
|
-
</div>
|
1491
|
-
|
1492
|
-
</li>
|
1493
|
-
|
1494
|
-
</ul>
|
1495
|
-
|
1496
|
-
<p class="tag_title">Returns:</p>
|
1497
|
-
<ul class="return">
|
1498
|
-
|
1499
|
-
<li>
|
1500
|
-
|
1501
|
-
|
1502
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Scene (class)">Scene</a></span></tt>)</span>
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
—
|
1507
|
-
<div class='inline'>
|
1508
|
-
<p>the receiver.</p>
|
1509
|
-
</div>
|
1510
|
-
|
1511
|
-
</li>
|
1512
|
-
|
1513
|
-
</ul>
|
1514
|
-
|
1515
|
-
</div><table class="source_code">
|
1516
|
-
<tr>
|
1517
|
-
<td>
|
1518
|
-
<pre class="lines">
|
1519
|
-
|
1520
|
-
|
1521
|
-
571</pre>
|
1522
|
-
</td>
|
1523
|
-
<td>
|
1524
|
-
<pre class="code"><span class="info file"># File 'motion-game', line 571</span>
|
1525
|
-
|
1526
|
-
<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>
|
1527
|
-
</td>
|
1528
|
-
</tr>
|
1529
|
-
</table>
|
1530
|
-
</div>
|
1531
|
-
|
1532
|
-
</div>
|
1533
|
-
|
1534
|
-
</div>
|
1535
|
-
|
1536
|
-
<div id="footer">
|
1537
|
-
Generated on Sun Dec 11 16:38:29 2016 by
|
1538
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1539
|
-
0.9.5 (ruby-2.3.3).
|
1540
|
-
</div>
|
1541
|
-
|
1542
|
-
</div>
|
1543
|
-
</body>
|
1544
|
-
</html>
|