motion-game 1.1.5 → 1.1.6
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/build/android/armeabi/libmotion-cocos.a +0 -0
- data/build/android/motion-cocos.jar +0 -0
- data/build/android/x86/libmotion-cocos.a +0 -0
- data/build/ios/libmotion-cocos.a +0 -0
- data/build/tvos/libmotion-cocos.a +0 -0
- data/doc/MG.html +40 -38
- data/doc/MG/Action.html +402 -0
- data/doc/MG/Animate.html +281 -0
- data/doc/MG/Application.html +55 -52
- data/doc/MG/Audio.html +96 -93
- data/doc/MG/Blink.html +257 -0
- data/doc/MG/Button.html +82 -79
- data/doc/MG/Color.html +70 -67
- data/doc/MG/DelayTime.html +239 -0
- data/doc/MG/Director.html +256 -95
- data/doc/MG/Draw.html +67 -64
- data/doc/MG/Events.html +39 -37
- data/doc/MG/Events/Acceleration.html +70 -67
- data/doc/MG/Events/Touch.html +52 -49
- data/doc/MG/FadeIn.html +240 -0
- data/doc/MG/FadeOut.html +240 -0
- data/doc/MG/FadeTo.html +256 -0
- data/doc/MG/File.html +50 -47
- data/doc/MG/Follow.html +241 -0
- data/doc/MG/JumpBy.html +292 -0
- data/doc/MG/JumpTo.html +287 -0
- data/doc/MG/Layout.html +70 -67
- data/doc/MG/List.html +88 -85
- data/doc/MG/Menu.html +65 -62
- data/doc/MG/MoveBy.html +259 -0
- data/doc/MG/MoveTo.html +257 -0
- data/doc/MG/Node.html +393 -133
- data/doc/MG/Parallax.html +51 -48
- data/doc/MG/Particle.html +118 -115
- data/doc/MG/Point.html +67 -64
- data/doc/MG/Repeat.html +257 -0
- data/doc/MG/RepeatForever.html +239 -0
- data/doc/MG/RotateBy.html +259 -0
- data/doc/MG/RotateTo.html +257 -0
- data/doc/MG/ScaleBy.html +255 -0
- data/doc/MG/ScaleTo.html +255 -0
- data/doc/MG/Scene.html +110 -107
- data/doc/MG/Scroll.html +70 -67
- data/doc/MG/Sequence.html +241 -0
- data/doc/MG/Size.html +75 -72
- data/doc/MG/SkewBy.html +273 -0
- data/doc/MG/SkewTo.html +273 -0
- data/doc/MG/Slider.html +58 -55
- data/doc/MG/Spawn.html +239 -0
- data/doc/MG/Speed.html +259 -0
- data/doc/MG/Sprite.html +547 -144
- data/doc/MG/Text.html +94 -91
- data/doc/MG/TintBy.html +272 -0
- data/doc/MG/TintTo.html +274 -0
- data/doc/MG/Web.html +77 -74
- data/doc/MG/Widget.html +70 -67
- data/doc/_index.html +223 -33
- data/doc/class_list.html +24 -31
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +220 -78
- data/doc/file.README.html +29 -30
- data/doc/file_list.html +26 -30
- data/doc/frames.html +7 -16
- data/doc/index.html +29 -30
- data/doc/js/app.js +100 -76
- data/doc/js/full_list.js +170 -135
- data/doc/method_list.html +1096 -500
- data/doc/top-level-namespace.html +35 -35
- data/lib/motion-game/android/main_activity.rb +21 -0
- data/lib/motion-game/ios/app_delegate.rb +14 -0
- data/lib/motion-game/tvos/app_delegate.rb +16 -0
- data/template/motion-game/files/app/application.rb +8 -0
- metadata +28 -4
data/doc/MG/Sprite.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Class: MG::Sprite
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "MG::Sprite";
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!MG/Sprite.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,50 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
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">
|
33
38
|
|
34
39
|
<a href="../_index.html">Index (S)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">Sprite</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
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>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
62
|
+
<iframe id="search_frame" src="../class_list.html"></iframe>
|
65
63
|
|
66
|
-
|
64
|
+
<div id="content"><h1>Class: MG::Sprite
|
67
65
|
|
68
66
|
|
69
67
|
|
70
68
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
69
|
+
<div class="box_info">
|
73
70
|
|
74
|
-
|
75
|
-
<
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
76
74
|
<span class="inheritName"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></span>
|
77
75
|
|
78
76
|
<ul class="fullTree">
|
@@ -85,33 +83,37 @@
|
|
85
83
|
</ul>
|
86
84
|
<a href="#" class="inheritanceTree">show all</a>
|
87
85
|
|
88
|
-
|
89
|
-
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
90
|
|
91
91
|
|
92
|
-
|
93
92
|
|
94
|
-
|
95
93
|
|
96
94
|
|
95
|
+
|
96
|
+
|
97
|
+
|
97
98
|
|
98
|
-
|
99
|
-
<
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>motion-game</dd>
|
102
|
+
</dl>
|
100
103
|
|
101
|
-
</
|
102
|
-
<div class="clear"></div>
|
104
|
+
</div>
|
103
105
|
|
104
106
|
|
105
107
|
|
106
108
|
|
107
109
|
|
108
|
-
<h2>Properties <small
|
110
|
+
<h2>Properties <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
109
111
|
<ul class="summary">
|
110
112
|
|
111
113
|
<li class="public ">
|
112
114
|
<span class="summary_signature">
|
113
115
|
|
114
|
-
<a href="#category_mask-instance_method" title="#category_mask (instance method)"
|
116
|
+
<a href="#category_mask-instance_method" title="#category_mask (instance method)">#<strong>category_mask</strong> ⇒ Integer </a>
|
115
117
|
|
116
118
|
|
117
119
|
|
@@ -138,7 +140,7 @@
|
|
138
140
|
<li class="public ">
|
139
141
|
<span class="summary_signature">
|
140
142
|
|
141
|
-
<a href="#collision_mask-instance_method" title="#collision_mask (instance method)"
|
143
|
+
<a href="#collision_mask-instance_method" title="#collision_mask (instance method)">#<strong>collision_mask</strong> ⇒ Integer </a>
|
142
144
|
|
143
145
|
|
144
146
|
|
@@ -165,7 +167,7 @@
|
|
165
167
|
<li class="public ">
|
166
168
|
<span class="summary_signature">
|
167
169
|
|
168
|
-
<a href="#contact_mask-instance_method" title="#contact_mask (instance method)"
|
170
|
+
<a href="#contact_mask-instance_method" title="#contact_mask (instance method)">#<strong>contact_mask</strong> ⇒ Integer </a>
|
169
171
|
|
170
172
|
|
171
173
|
|
@@ -192,7 +194,7 @@
|
|
192
194
|
<li class="public ">
|
193
195
|
<span class="summary_signature">
|
194
196
|
|
195
|
-
<a href="#dynamic%3F-instance_method" title="#dynamic? (instance method)"
|
197
|
+
<a href="#dynamic%3F-instance_method" title="#dynamic? (instance method)">#<strong>dynamic?</strong> ⇒ Boolean </a>
|
196
198
|
|
197
199
|
|
198
200
|
|
@@ -219,7 +221,7 @@
|
|
219
221
|
<li class="public ">
|
220
222
|
<span class="summary_signature">
|
221
223
|
|
222
|
-
<a href="#friction-instance_method" title="#friction (instance method)"
|
224
|
+
<a href="#friction-instance_method" title="#friction (instance method)">#<strong>friction</strong> ⇒ Float </a>
|
223
225
|
|
224
226
|
|
225
227
|
|
@@ -246,7 +248,7 @@
|
|
246
248
|
<li class="public ">
|
247
249
|
<span class="summary_signature">
|
248
250
|
|
249
|
-
<a href="#gravitates%3F-instance_method" title="#gravitates? (instance method)"
|
251
|
+
<a href="#gravitates%3F-instance_method" title="#gravitates? (instance method)">#<strong>gravitates?</strong> ⇒ Boolean </a>
|
250
252
|
|
251
253
|
|
252
254
|
|
@@ -274,7 +276,7 @@ force.</p>
|
|
274
276
|
<li class="public ">
|
275
277
|
<span class="summary_signature">
|
276
278
|
|
277
|
-
<a href="#inertia_moment-instance_method" title="#inertia_moment (instance method)"
|
279
|
+
<a href="#inertia_moment-instance_method" title="#inertia_moment (instance method)">#<strong>inertia_moment</strong> ⇒ Float </a>
|
278
280
|
|
279
281
|
|
280
282
|
|
@@ -301,7 +303,7 @@ force.</p>
|
|
301
303
|
<li class="public ">
|
302
304
|
<span class="summary_signature">
|
303
305
|
|
304
|
-
<a href="#mass-instance_method" title="#mass (instance method)"
|
306
|
+
<a href="#mass-instance_method" title="#mass (instance method)">#<strong>mass</strong> ⇒ Float </a>
|
305
307
|
|
306
308
|
|
307
309
|
|
@@ -328,7 +330,7 @@ force.</p>
|
|
328
330
|
<li class="public ">
|
329
331
|
<span class="summary_signature">
|
330
332
|
|
331
|
-
<a href="#resting%3F-instance_method" title="#resting? (instance method)"
|
333
|
+
<a href="#resting%3F-instance_method" title="#resting? (instance method)">#<strong>resting?</strong> ⇒ Boolean </a>
|
332
334
|
|
333
335
|
|
334
336
|
|
@@ -355,7 +357,7 @@ force.</p>
|
|
355
357
|
<li class="public ">
|
356
358
|
<span class="summary_signature">
|
357
359
|
|
358
|
-
<a href="#velocity-instance_method" title="#velocity (instance method)"
|
360
|
+
<a href="#velocity-instance_method" title="#velocity (instance method)">#<strong>velocity</strong> ⇒ Point </a>
|
359
361
|
|
360
362
|
|
361
363
|
|
@@ -392,7 +394,7 @@ force.</p>
|
|
392
394
|
|
393
395
|
<h2>
|
394
396
|
Spritesheets
|
395
|
-
<small
|
397
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
396
398
|
</h2>
|
397
399
|
|
398
400
|
<ul class="summary">
|
@@ -400,7 +402,7 @@ force.</p>
|
|
400
402
|
<li class="public ">
|
401
403
|
<span class="summary_signature">
|
402
404
|
|
403
|
-
<a href="#load-class_method" title="load (class method)"
|
405
|
+
<a href="#load-class_method" title="load (class method)">.<strong>load</strong>(file_name) ⇒ nil </a>
|
404
406
|
|
405
407
|
|
406
408
|
|
@@ -427,7 +429,7 @@ resource directory.</p>
|
|
427
429
|
|
428
430
|
<h2>
|
429
431
|
Constructors
|
430
|
-
<small
|
432
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
431
433
|
</h2>
|
432
434
|
|
433
435
|
<ul class="summary">
|
@@ -435,7 +437,7 @@ resource directory.</p>
|
|
435
437
|
<li class="public ">
|
436
438
|
<span class="summary_signature">
|
437
439
|
|
438
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)"
|
440
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(sprite_name) ⇒ Sprite </a>
|
439
441
|
|
440
442
|
|
441
443
|
|
@@ -465,7 +467,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
465
467
|
|
466
468
|
<h2>
|
467
469
|
Actions
|
468
|
-
<small
|
470
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
469
471
|
</h2>
|
470
472
|
|
471
473
|
<ul class="summary">
|
@@ -473,7 +475,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
473
475
|
<li class="public ">
|
474
476
|
<span class="summary_signature">
|
475
477
|
|
476
|
-
<a href="#animate-instance_method" title="#animate (instance method)"
|
478
|
+
<a href="#animate-instance_method" title="#animate (instance method)">#<strong>animate</strong>(frame_names, delay, loops = 1) ⇒ Sprite </a>
|
477
479
|
|
478
480
|
|
479
481
|
|
@@ -499,7 +501,7 @@ given frames in <code>sprite_frames_names</code> based on the given
|
|
499
501
|
<li class="public ">
|
500
502
|
<span class="summary_signature">
|
501
503
|
|
502
|
-
<a href="#blink-instance_method" title="#blink (instance method)"
|
504
|
+
<a href="#blink-instance_method" title="#blink (instance method)">#<strong>blink</strong>(number_of_blinks, interval) ⇒ Sprite </a>
|
503
505
|
|
504
506
|
|
505
507
|
|
@@ -523,7 +525,55 @@ given frames in <code>sprite_frames_names</code> based on the given
|
|
523
525
|
<li class="public ">
|
524
526
|
<span class="summary_signature">
|
525
527
|
|
526
|
-
<a href="#
|
528
|
+
<a href="#flipped_horizontally%3D-instance_method" title="#flipped_horizontally= (instance method)">#<strong>flipped_horizontally=</strong>(value) ⇒ Object </a>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
</span>
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
<span class="summary_desc"><div class='inline'>
|
543
|
+
<p>Sets whether the sprite should be flipped horizontally or not.</p>
|
544
|
+
</div></span>
|
545
|
+
|
546
|
+
</li>
|
547
|
+
|
548
|
+
|
549
|
+
<li class="public ">
|
550
|
+
<span class="summary_signature">
|
551
|
+
|
552
|
+
<a href="#flipped_vertically%3D-instance_method" title="#flipped_vertically= (instance method)">#<strong>flipped_vertically=</strong>(value) ⇒ Object </a>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
</span>
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
<span class="summary_desc"><div class='inline'>
|
567
|
+
<p>Sets whether the sprite should be flipped vertically or not.</p>
|
568
|
+
</div></span>
|
569
|
+
|
570
|
+
</li>
|
571
|
+
|
572
|
+
|
573
|
+
<li class="public ">
|
574
|
+
<span class="summary_signature">
|
575
|
+
|
576
|
+
<a href="#move_by-instance_method" title="#move_by (instance method)">#<strong>move_by</strong>(delta_location, interval) ⇒ Sprite </a>
|
527
577
|
|
528
578
|
|
529
579
|
|
@@ -548,7 +598,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
548
598
|
<li class="public ">
|
549
599
|
<span class="summary_signature">
|
550
600
|
|
551
|
-
<a href="#move_to-instance_method" title="#move_to (instance method)"
|
601
|
+
<a href="#move_to-instance_method" title="#move_to (instance method)">#<strong>move_to</strong>(location, interval) ⇒ Sprite </a>
|
552
602
|
|
553
603
|
|
554
604
|
|
@@ -566,6 +616,56 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
566
616
|
<p>Moves the position of the receiver to a new given location.</p>
|
567
617
|
</div></span>
|
568
618
|
|
619
|
+
</li>
|
620
|
+
|
621
|
+
|
622
|
+
<li class="public ">
|
623
|
+
<span class="summary_signature">
|
624
|
+
|
625
|
+
<a href="#rotate_by-instance_method" title="#rotate_by (instance method)">#<strong>rotate_by</strong>(delta_angle, interval) ⇒ Sprite </a>
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
</span>
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
<span class="summary_desc"><div class='inline'>
|
640
|
+
<p>Rotates the position of the receiver to a new angle determined by the sum
|
641
|
+
of the current rotation and the given <code>delta_angle</code> object.</p>
|
642
|
+
</div></span>
|
643
|
+
|
644
|
+
</li>
|
645
|
+
|
646
|
+
|
647
|
+
<li class="public ">
|
648
|
+
<span class="summary_signature">
|
649
|
+
|
650
|
+
<a href="#rotate_to-instance_method" title="#rotate_to (instance method)">#<strong>rotate_to</strong>(angle, interval) ⇒ Sprite </a>
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
</span>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
<span class="summary_desc"><div class='inline'>
|
665
|
+
<p>Rotates the angle of the receiver to a new angle certain angle by modifying
|
666
|
+
it's rotation attribute.</p>
|
667
|
+
</div></span>
|
668
|
+
|
569
669
|
</li>
|
570
670
|
|
571
671
|
|
@@ -573,7 +673,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
573
673
|
|
574
674
|
<h2>
|
575
675
|
Physics
|
576
|
-
<small
|
676
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
577
677
|
</h2>
|
578
678
|
|
579
679
|
<ul class="summary">
|
@@ -581,7 +681,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
581
681
|
<li class="public ">
|
582
682
|
<span class="summary_signature">
|
583
683
|
|
584
|
-
<a href="#apply_force-instance_method" title="#apply_force (instance method)"
|
684
|
+
<a href="#apply_force-instance_method" title="#apply_force (instance method)">#<strong>apply_force</strong>(force) ⇒ Sprite </a>
|
585
685
|
|
586
686
|
|
587
687
|
|
@@ -605,7 +705,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
605
705
|
<li class="public ">
|
606
706
|
<span class="summary_signature">
|
607
707
|
|
608
|
-
<a href="#apply_impulse-instance_method" title="#apply_impulse (instance method)"
|
708
|
+
<a href="#apply_impulse-instance_method" title="#apply_impulse (instance method)">#<strong>apply_impulse</strong>(force) ⇒ Sprite </a>
|
609
709
|
|
610
710
|
|
611
711
|
|
@@ -629,7 +729,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
629
729
|
<li class="public ">
|
630
730
|
<span class="summary_signature">
|
631
731
|
|
632
|
-
<a href="#attach_physics_box-instance_method" title="#attach_physics_box (instance method)"
|
732
|
+
<a href="#attach_physics_box-instance_method" title="#attach_physics_box (instance method)">#<strong>attach_physics_box</strong>(size = nil) ⇒ Sprite </a>
|
633
733
|
|
634
734
|
|
635
735
|
|
@@ -663,14 +763,14 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
663
763
|
|
664
764
|
|
665
765
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
|
666
|
-
<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>
|
766
|
+
<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>
|
667
767
|
<div id="constructor_details" class="method_details_list">
|
668
768
|
<h2>Constructor Details</h2>
|
669
769
|
|
670
770
|
<div class="method_details first">
|
671
771
|
<h3 class="signature first" id="initialize-instance_method">
|
672
772
|
|
673
|
-
|
773
|
+
#<strong>initialize</strong>(sprite_name) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
674
774
|
|
675
775
|
|
676
776
|
|
@@ -716,10 +816,10 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
716
816
|
<pre class="lines">
|
717
817
|
|
718
818
|
|
719
|
-
|
819
|
+
880</pre>
|
720
820
|
</td>
|
721
821
|
<td>
|
722
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
822
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 880</span>
|
723
823
|
|
724
824
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_sprite_name'>sprite_name</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
725
825
|
</td>
|
@@ -737,7 +837,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
737
837
|
<div class="method_details first">
|
738
838
|
<h3 class="signature first" id="category_mask-instance_method">
|
739
839
|
|
740
|
-
|
840
|
+
#<strong>category_mask</strong> ⇒ <tt>Integer</tt>
|
741
841
|
|
742
842
|
|
743
843
|
|
@@ -778,12 +878,12 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
778
878
|
<pre class="lines">
|
779
879
|
|
780
880
|
|
781
|
-
|
782
|
-
|
783
|
-
|
881
|
+
992
|
882
|
+
993
|
883
|
+
994</pre>
|
784
884
|
</td>
|
785
885
|
<td>
|
786
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
886
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 992</span>
|
787
887
|
|
788
888
|
<span class='kw'>def</span> <span class='id identifier rubyid_category_mask'>category_mask</span>
|
789
889
|
<span class='ivar'>@category_mask</span>
|
@@ -798,7 +898,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
798
898
|
<div class="method_details ">
|
799
899
|
<h3 class="signature " id="collision_mask-instance_method">
|
800
900
|
|
801
|
-
|
901
|
+
#<strong>collision_mask</strong> ⇒ <tt>Integer</tt>
|
802
902
|
|
803
903
|
|
804
904
|
|
@@ -839,12 +939,12 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
839
939
|
<pre class="lines">
|
840
940
|
|
841
941
|
|
842
|
-
|
843
|
-
|
844
|
-
|
942
|
+
998
|
943
|
+
999
|
944
|
+
1000</pre>
|
845
945
|
</td>
|
846
946
|
<td>
|
847
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
947
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 998</span>
|
848
948
|
|
849
949
|
<span class='kw'>def</span> <span class='id identifier rubyid_collision_mask'>collision_mask</span>
|
850
950
|
<span class='ivar'>@collision_mask</span>
|
@@ -859,7 +959,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
859
959
|
<div class="method_details ">
|
860
960
|
<h3 class="signature " id="contact_mask-instance_method">
|
861
961
|
|
862
|
-
|
962
|
+
#<strong>contact_mask</strong> ⇒ <tt>Integer</tt>
|
863
963
|
|
864
964
|
|
865
965
|
|
@@ -900,12 +1000,12 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
900
1000
|
<pre class="lines">
|
901
1001
|
|
902
1002
|
|
903
|
-
|
904
|
-
|
905
|
-
|
1003
|
+
995
|
1004
|
+
996
|
1005
|
+
997</pre>
|
906
1006
|
</td>
|
907
1007
|
<td>
|
908
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1008
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 995</span>
|
909
1009
|
|
910
1010
|
<span class='kw'>def</span> <span class='id identifier rubyid_contact_mask'>contact_mask</span>
|
911
1011
|
<span class='ivar'>@contact_mask</span>
|
@@ -920,7 +1020,7 @@ spritesheet using <span class='object_link'><a href="#load-class_method" title="
|
|
920
1020
|
<div class="method_details ">
|
921
1021
|
<h3 class="signature " id="dynamic?-instance_method">
|
922
1022
|
|
923
|
-
|
1023
|
+
#<strong>dynamic?</strong> ⇒ <tt>Boolean</tt>
|
924
1024
|
|
925
1025
|
|
926
1026
|
|
@@ -964,12 +1064,12 @@ default is <code>true</code>, and a dynamic body will affect with gravity.</p>
|
|
964
1064
|
<pre class="lines">
|
965
1065
|
|
966
1066
|
|
967
|
-
|
968
|
-
|
969
|
-
|
1067
|
+
977
|
1068
|
+
978
|
1069
|
+
979</pre>
|
970
1070
|
</td>
|
971
1071
|
<td>
|
972
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1072
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 977</span>
|
973
1073
|
|
974
1074
|
def dynamic?
|
975
1075
|
@dynamic?
|
@@ -984,7 +1084,7 @@ end</pre>
|
|
984
1084
|
<div class="method_details ">
|
985
1085
|
<h3 class="signature " id="friction-instance_method">
|
986
1086
|
|
987
|
-
|
1087
|
+
#<strong>friction</strong> ⇒ <tt>Float</tt>
|
988
1088
|
|
989
1089
|
|
990
1090
|
|
@@ -1025,12 +1125,12 @@ end</pre>
|
|
1025
1125
|
<pre class="lines">
|
1026
1126
|
|
1027
1127
|
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1128
|
+
980
|
1129
|
+
981
|
1130
|
+
982</pre>
|
1031
1131
|
</td>
|
1032
1132
|
<td>
|
1033
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1133
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 980</span>
|
1034
1134
|
|
1035
1135
|
<span class='kw'>def</span> <span class='id identifier rubyid_friction'>friction</span>
|
1036
1136
|
<span class='ivar'>@friction</span>
|
@@ -1045,7 +1145,7 @@ end</pre>
|
|
1045
1145
|
<div class="method_details ">
|
1046
1146
|
<h3 class="signature " id="gravitates?-instance_method">
|
1047
1147
|
|
1048
|
-
|
1148
|
+
#<strong>gravitates?</strong> ⇒ <tt>Boolean</tt>
|
1049
1149
|
|
1050
1150
|
|
1051
1151
|
|
@@ -1088,12 +1188,12 @@ force. The default is <code>true</code>.</p>
|
|
1088
1188
|
<pre class="lines">
|
1089
1189
|
|
1090
1190
|
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1191
|
+
972
|
1192
|
+
973
|
1193
|
+
974</pre>
|
1094
1194
|
</td>
|
1095
1195
|
<td>
|
1096
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1196
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 972</span>
|
1097
1197
|
|
1098
1198
|
def gravitates?
|
1099
1199
|
@gravitates?
|
@@ -1108,7 +1208,7 @@ end</pre>
|
|
1108
1208
|
<div class="method_details ">
|
1109
1209
|
<h3 class="signature " id="inertia_moment-instance_method">
|
1110
1210
|
|
1111
|
-
|
1211
|
+
#<strong>inertia_moment</strong> ⇒ <tt>Float</tt>
|
1112
1212
|
|
1113
1213
|
|
1114
1214
|
|
@@ -1149,12 +1249,12 @@ end</pre>
|
|
1149
1249
|
<pre class="lines">
|
1150
1250
|
|
1151
1251
|
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1252
|
+
989
|
1253
|
+
990
|
1254
|
+
991</pre>
|
1155
1255
|
</td>
|
1156
1256
|
<td>
|
1157
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1257
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 989</span>
|
1158
1258
|
|
1159
1259
|
<span class='kw'>def</span> <span class='id identifier rubyid_inertia_moment'>inertia_moment</span>
|
1160
1260
|
<span class='ivar'>@inertia_moment</span>
|
@@ -1169,7 +1269,7 @@ end</pre>
|
|
1169
1269
|
<div class="method_details ">
|
1170
1270
|
<h3 class="signature " id="mass-instance_method">
|
1171
1271
|
|
1172
|
-
|
1272
|
+
#<strong>mass</strong> ⇒ <tt>Float</tt>
|
1173
1273
|
|
1174
1274
|
|
1175
1275
|
|
@@ -1210,12 +1310,12 @@ end</pre>
|
|
1210
1310
|
<pre class="lines">
|
1211
1311
|
|
1212
1312
|
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1313
|
+
968
|
1314
|
+
969
|
1315
|
+
970</pre>
|
1216
1316
|
</td>
|
1217
1317
|
<td>
|
1218
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1318
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 968</span>
|
1219
1319
|
|
1220
1320
|
<span class='kw'>def</span> <span class='id identifier rubyid_mass'>mass</span>
|
1221
1321
|
<span class='ivar'>@mass</span>
|
@@ -1230,7 +1330,7 @@ end</pre>
|
|
1230
1330
|
<div class="method_details ">
|
1231
1331
|
<h3 class="signature " id="resting?-instance_method">
|
1232
1332
|
|
1233
|
-
|
1333
|
+
#<strong>resting?</strong> ⇒ <tt>Boolean</tt>
|
1234
1334
|
|
1235
1335
|
|
1236
1336
|
|
@@ -1271,12 +1371,12 @@ end</pre>
|
|
1271
1371
|
<pre class="lines">
|
1272
1372
|
|
1273
1373
|
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1374
|
+
986
|
1375
|
+
987
|
1376
|
+
988</pre>
|
1277
1377
|
</td>
|
1278
1378
|
<td>
|
1279
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1379
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 986</span>
|
1280
1380
|
|
1281
1381
|
def resting?
|
1282
1382
|
@resting?
|
@@ -1291,7 +1391,7 @@ end</pre>
|
|
1291
1391
|
<div class="method_details ">
|
1292
1392
|
<h3 class="signature " id="velocity-instance_method">
|
1293
1393
|
|
1294
|
-
|
1394
|
+
#<strong>velocity</strong> ⇒ <tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>
|
1295
1395
|
|
1296
1396
|
|
1297
1397
|
|
@@ -1332,12 +1432,12 @@ end</pre>
|
|
1332
1432
|
<pre class="lines">
|
1333
1433
|
|
1334
1434
|
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1435
|
+
983
|
1436
|
+
984
|
1437
|
+
985</pre>
|
1338
1438
|
</td>
|
1339
1439
|
<td>
|
1340
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1440
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 983</span>
|
1341
1441
|
|
1342
1442
|
<span class='kw'>def</span> <span class='id identifier rubyid_velocity'>velocity</span>
|
1343
1443
|
<span class='ivar'>@velocity</span>
|
@@ -1357,7 +1457,7 @@ end</pre>
|
|
1357
1457
|
<div class="method_details first">
|
1358
1458
|
<h3 class="signature first" id="load-class_method">
|
1359
1459
|
|
1360
|
-
|
1460
|
+
.<strong>load</strong>(file_name) ⇒ <tt>nil</tt>
|
1361
1461
|
|
1362
1462
|
|
1363
1463
|
|
@@ -1418,10 +1518,10 @@ TexturePacker.</p>
|
|
1418
1518
|
<pre class="lines">
|
1419
1519
|
|
1420
1520
|
|
1421
|
-
|
1521
|
+
870</pre>
|
1422
1522
|
</td>
|
1423
1523
|
<td>
|
1424
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1524
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 870</span>
|
1425
1525
|
|
1426
1526
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1427
1527
|
</td>
|
@@ -1438,7 +1538,7 @@ TexturePacker.</p>
|
|
1438
1538
|
<div class="method_details first">
|
1439
1539
|
<h3 class="signature first" id="animate-instance_method">
|
1440
1540
|
|
1441
|
-
|
1541
|
+
#<strong>animate</strong>(frame_names, delay, loops = 1) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1442
1542
|
|
1443
1543
|
|
1444
1544
|
|
@@ -1539,10 +1639,10 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1539
1639
|
<pre class="lines">
|
1540
1640
|
|
1541
1641
|
|
1542
|
-
|
1642
|
+
931</pre>
|
1543
1643
|
</td>
|
1544
1644
|
<td>
|
1545
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1645
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 931</span>
|
1546
1646
|
|
1547
1647
|
<span class='kw'>def</span> <span class='id identifier rubyid_animate'>animate</span><span class='lparen'>(</span><span class='id identifier rubyid_frame_names'>frame_names</span><span class='comma'>,</span> <span class='id identifier rubyid_delay'>delay</span><span class='comma'>,</span> <span class='id identifier rubyid_loops'>loops</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1548
1648
|
</td>
|
@@ -1553,7 +1653,7 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1553
1653
|
<div class="method_details ">
|
1554
1654
|
<h3 class="signature " id="apply_force-instance_method">
|
1555
1655
|
|
1556
|
-
|
1656
|
+
#<strong>apply_force</strong>(force) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1557
1657
|
|
1558
1658
|
|
1559
1659
|
|
@@ -1614,10 +1714,10 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1614
1714
|
<pre class="lines">
|
1615
1715
|
|
1616
1716
|
|
1617
|
-
|
1717
|
+
962</pre>
|
1618
1718
|
</td>
|
1619
1719
|
<td>
|
1620
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1720
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 962</span>
|
1621
1721
|
|
1622
1722
|
<span class='kw'>def</span> <span class='id identifier rubyid_apply_force'>apply_force</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1623
1723
|
</td>
|
@@ -1628,7 +1728,7 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1628
1728
|
<div class="method_details ">
|
1629
1729
|
<h3 class="signature " id="apply_impulse-instance_method">
|
1630
1730
|
|
1631
|
-
|
1731
|
+
#<strong>apply_impulse</strong>(force) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1632
1732
|
|
1633
1733
|
|
1634
1734
|
|
@@ -1689,10 +1789,10 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1689
1789
|
<pre class="lines">
|
1690
1790
|
|
1691
1791
|
|
1692
|
-
|
1792
|
+
957</pre>
|
1693
1793
|
</td>
|
1694
1794
|
<td>
|
1695
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1795
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 957</span>
|
1696
1796
|
|
1697
1797
|
<span class='kw'>def</span> <span class='id identifier rubyid_apply_impulse'>apply_impulse</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1698
1798
|
</td>
|
@@ -1703,7 +1803,7 @@ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.l
|
|
1703
1803
|
<div class="method_details ">
|
1704
1804
|
<h3 class="signature " id="attach_physics_box-instance_method">
|
1705
1805
|
|
1706
|
-
|
1806
|
+
#<strong>attach_physics_box</strong>(size = nil) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1707
1807
|
|
1708
1808
|
|
1709
1809
|
|
@@ -1767,10 +1867,10 @@ retrieved with <span class='object_link'><a href="Node.html#size-instance_method
|
|
1767
1867
|
<pre class="lines">
|
1768
1868
|
|
1769
1869
|
|
1770
|
-
|
1870
|
+
952</pre>
|
1771
1871
|
</td>
|
1772
1872
|
<td>
|
1773
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1873
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 952</span>
|
1774
1874
|
|
1775
1875
|
<span class='kw'>def</span> <span class='id identifier rubyid_attach_physics_box'>attach_physics_box</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1776
1876
|
</td>
|
@@ -1781,7 +1881,7 @@ retrieved with <span class='object_link'><a href="Node.html#size-instance_method
|
|
1781
1881
|
<div class="method_details ">
|
1782
1882
|
<h3 class="signature " id="blink-instance_method">
|
1783
1883
|
|
1784
|
-
|
1884
|
+
#<strong>blink</strong>(number_of_blinks, interval) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1785
1885
|
|
1786
1886
|
|
1787
1887
|
|
@@ -1858,21 +1958,139 @@ retrieved with <span class='object_link'><a href="Node.html#size-instance_method
|
|
1858
1958
|
<pre class="lines">
|
1859
1959
|
|
1860
1960
|
|
1861
|
-
|
1961
|
+
918</pre>
|
1862
1962
|
</td>
|
1863
1963
|
<td>
|
1864
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
1964
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 918</span>
|
1865
1965
|
|
1866
1966
|
<span class='kw'>def</span> <span class='id identifier rubyid_blink'>blink</span><span class='lparen'>(</span><span class='id identifier rubyid_number_of_blinks'>number_of_blinks</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1867
1967
|
</td>
|
1868
1968
|
</tr>
|
1869
1969
|
</table>
|
1970
|
+
</div>
|
1971
|
+
|
1972
|
+
<div class="method_details ">
|
1973
|
+
<h3 class="signature " id="flipped_horizontally=-instance_method">
|
1974
|
+
|
1975
|
+
#<strong>flipped_horizontally=</strong>(value) ⇒ <tt>Object</tt>
|
1976
|
+
|
1977
|
+
|
1978
|
+
|
1979
|
+
|
1980
|
+
|
1981
|
+
</h3><div class="docstring">
|
1982
|
+
<div class="discussion">
|
1983
|
+
|
1984
|
+
<p>Sets whether the sprite should be flipped horizontally or not. It only
|
1985
|
+
flips the texture of the sprite, and not the texture of the sprite's
|
1986
|
+
children. Also, flipping the texture doesn't alter the anchorPoint.</p>
|
1987
|
+
|
1988
|
+
|
1989
|
+
</div>
|
1990
|
+
</div>
|
1991
|
+
<div class="tags">
|
1992
|
+
<p class="tag_title">Parameters:</p>
|
1993
|
+
<ul class="param">
|
1994
|
+
|
1995
|
+
<li>
|
1996
|
+
|
1997
|
+
<span class='name'>value</span>
|
1998
|
+
|
1999
|
+
|
2000
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2001
|
+
|
2002
|
+
|
2003
|
+
|
2004
|
+
—
|
2005
|
+
<div class='inline'>
|
2006
|
+
<p>true if the sprite should be flipped horizontally, false otherwise.</p>
|
2007
|
+
</div>
|
2008
|
+
|
2009
|
+
</li>
|
2010
|
+
|
2011
|
+
</ul>
|
2012
|
+
|
2013
|
+
|
2014
|
+
</div><table class="source_code">
|
2015
|
+
<tr>
|
2016
|
+
<td>
|
2017
|
+
<pre class="lines">
|
2018
|
+
|
2019
|
+
|
2020
|
+
937</pre>
|
2021
|
+
</td>
|
2022
|
+
<td>
|
2023
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 937</span>
|
2024
|
+
|
2025
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_flipped_horizontally='>flipped_horizontally=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2026
|
+
</td>
|
2027
|
+
</tr>
|
2028
|
+
</table>
|
2029
|
+
</div>
|
2030
|
+
|
2031
|
+
<div class="method_details ">
|
2032
|
+
<h3 class="signature " id="flipped_vertically=-instance_method">
|
2033
|
+
|
2034
|
+
#<strong>flipped_vertically=</strong>(value) ⇒ <tt>Object</tt>
|
2035
|
+
|
2036
|
+
|
2037
|
+
|
2038
|
+
|
2039
|
+
|
2040
|
+
</h3><div class="docstring">
|
2041
|
+
<div class="discussion">
|
2042
|
+
|
2043
|
+
<p>Sets whether the sprite should be flipped vertically or not. It only flips
|
2044
|
+
the texture of the sprite, and not the texture of the sprite's
|
2045
|
+
children. Also, flipping the texture doesn't alter the anchorPoint.</p>
|
2046
|
+
|
2047
|
+
|
2048
|
+
</div>
|
2049
|
+
</div>
|
2050
|
+
<div class="tags">
|
2051
|
+
<p class="tag_title">Parameters:</p>
|
2052
|
+
<ul class="param">
|
2053
|
+
|
2054
|
+
<li>
|
2055
|
+
|
2056
|
+
<span class='name'>value</span>
|
2057
|
+
|
2058
|
+
|
2059
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2060
|
+
|
2061
|
+
|
2062
|
+
|
2063
|
+
—
|
2064
|
+
<div class='inline'>
|
2065
|
+
<p>true if the sprite should be flipped vertically, false otherwise.</p>
|
2066
|
+
</div>
|
2067
|
+
|
2068
|
+
</li>
|
2069
|
+
|
2070
|
+
</ul>
|
2071
|
+
|
2072
|
+
|
2073
|
+
</div><table class="source_code">
|
2074
|
+
<tr>
|
2075
|
+
<td>
|
2076
|
+
<pre class="lines">
|
2077
|
+
|
2078
|
+
|
2079
|
+
943</pre>
|
2080
|
+
</td>
|
2081
|
+
<td>
|
2082
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 943</span>
|
2083
|
+
|
2084
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_flipped_vertically='>flipped_vertically=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2085
|
+
</td>
|
2086
|
+
</tr>
|
2087
|
+
</table>
|
1870
2088
|
</div>
|
1871
2089
|
|
1872
2090
|
<div class="method_details ">
|
1873
2091
|
<h3 class="signature " id="move_by-instance_method">
|
1874
2092
|
|
1875
|
-
|
2093
|
+
#<strong>move_by</strong>(delta_location, interval) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1876
2094
|
|
1877
2095
|
|
1878
2096
|
|
@@ -1950,10 +2168,10 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
1950
2168
|
<pre class="lines">
|
1951
2169
|
|
1952
2170
|
|
1953
|
-
|
2171
|
+
891</pre>
|
1954
2172
|
</td>
|
1955
2173
|
<td>
|
1956
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
2174
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 891</span>
|
1957
2175
|
|
1958
2176
|
<span class='kw'>def</span> <span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='id identifier rubyid_delta_location'>delta_location</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1959
2177
|
</td>
|
@@ -1964,7 +2182,7 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
1964
2182
|
<div class="method_details ">
|
1965
2183
|
<h3 class="signature " id="move_to-instance_method">
|
1966
2184
|
|
1967
|
-
|
2185
|
+
#<strong>move_to</strong>(location, interval) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
1968
2186
|
|
1969
2187
|
|
1970
2188
|
|
@@ -2041,10 +2259,10 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
2041
2259
|
<pre class="lines">
|
2042
2260
|
|
2043
2261
|
|
2044
|
-
|
2262
|
+
897</pre>
|
2045
2263
|
</td>
|
2046
2264
|
<td>
|
2047
|
-
<pre class="code"><span class="info file"># File 'motion-game', line
|
2265
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 897</span>
|
2048
2266
|
|
2049
2267
|
<span class='kw'>def</span> <span class='id identifier rubyid_move_to'>move_to</span><span class='lparen'>(</span><span class='id identifier rubyid_location'>location</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2050
2268
|
</td>
|
@@ -2052,15 +2270,200 @@ of the current location and the given <code>delta_location</code> object.</p>
|
|
2052
2270
|
</table>
|
2053
2271
|
</div>
|
2054
2272
|
|
2273
|
+
<div class="method_details ">
|
2274
|
+
<h3 class="signature " id="rotate_by-instance_method">
|
2275
|
+
|
2276
|
+
#<strong>rotate_by</strong>(delta_angle, interval) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
2277
|
+
|
2278
|
+
|
2279
|
+
|
2280
|
+
|
2281
|
+
|
2282
|
+
</h3><div class="docstring">
|
2283
|
+
<div class="discussion">
|
2284
|
+
|
2285
|
+
<p>Rotates the position of the receiver to a new angle determined by the sum
|
2286
|
+
of the current rotation and the given <code>delta_angle</code> object.</p>
|
2287
|
+
|
2288
|
+
|
2289
|
+
</div>
|
2290
|
+
</div>
|
2291
|
+
<div class="tags">
|
2292
|
+
<p class="tag_title">Parameters:</p>
|
2293
|
+
<ul class="param">
|
2294
|
+
|
2295
|
+
<li>
|
2296
|
+
|
2297
|
+
<span class='name'>delta_angle</span>
|
2298
|
+
|
2299
|
+
|
2300
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
2301
|
+
|
2302
|
+
|
2303
|
+
|
2304
|
+
—
|
2305
|
+
<div class='inline'>
|
2306
|
+
<p>the angle to add to the current rotation</p>
|
2307
|
+
</div>
|
2308
|
+
|
2309
|
+
</li>
|
2310
|
+
|
2311
|
+
<li>
|
2312
|
+
|
2313
|
+
<span class='name'>interval</span>
|
2314
|
+
|
2315
|
+
|
2316
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
2317
|
+
|
2318
|
+
|
2319
|
+
|
2320
|
+
—
|
2321
|
+
<div class='inline'>
|
2322
|
+
<p>the animation interval.</p>
|
2323
|
+
</div>
|
2324
|
+
|
2325
|
+
</li>
|
2326
|
+
|
2327
|
+
</ul>
|
2328
|
+
|
2329
|
+
<p class="tag_title">Returns:</p>
|
2330
|
+
<ul class="return">
|
2331
|
+
|
2332
|
+
<li>
|
2333
|
+
|
2334
|
+
|
2335
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
|
2336
|
+
|
2337
|
+
|
2338
|
+
|
2339
|
+
—
|
2340
|
+
<div class='inline'>
|
2341
|
+
<p>the receiver.</p>
|
2342
|
+
</div>
|
2343
|
+
|
2344
|
+
</li>
|
2345
|
+
|
2346
|
+
</ul>
|
2347
|
+
|
2348
|
+
</div><table class="source_code">
|
2349
|
+
<tr>
|
2350
|
+
<td>
|
2351
|
+
<pre class="lines">
|
2352
|
+
|
2353
|
+
|
2354
|
+
904</pre>
|
2355
|
+
</td>
|
2356
|
+
<td>
|
2357
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 904</span>
|
2358
|
+
|
2359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rotate_by'>rotate_by</span><span class='lparen'>(</span><span class='id identifier rubyid_delta_angle'>delta_angle</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2360
|
+
</td>
|
2361
|
+
</tr>
|
2362
|
+
</table>
|
2363
|
+
</div>
|
2364
|
+
|
2365
|
+
<div class="method_details ">
|
2366
|
+
<h3 class="signature " id="rotate_to-instance_method">
|
2367
|
+
|
2368
|
+
#<strong>rotate_to</strong>(angle, interval) ⇒ <tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>
|
2369
|
+
|
2370
|
+
|
2371
|
+
|
2372
|
+
|
2373
|
+
|
2374
|
+
</h3><div class="docstring">
|
2375
|
+
<div class="discussion">
|
2376
|
+
|
2377
|
+
<p>Rotates the angle of the receiver to a new angle certain angle by modifying
|
2378
|
+
it's rotation attribute.</p>
|
2379
|
+
|
2380
|
+
|
2055
2381
|
</div>
|
2382
|
+
</div>
|
2383
|
+
<div class="tags">
|
2384
|
+
<p class="tag_title">Parameters:</p>
|
2385
|
+
<ul class="param">
|
2386
|
+
|
2387
|
+
<li>
|
2388
|
+
|
2389
|
+
<span class='name'>angle</span>
|
2390
|
+
|
2391
|
+
|
2392
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
2393
|
+
|
2394
|
+
|
2395
|
+
|
2396
|
+
—
|
2397
|
+
<div class='inline'>
|
2398
|
+
<p>the receiver should be rotated to.</p>
|
2399
|
+
</div>
|
2400
|
+
|
2401
|
+
</li>
|
2402
|
+
|
2403
|
+
<li>
|
2404
|
+
|
2405
|
+
<span class='name'>interval</span>
|
2406
|
+
|
2407
|
+
|
2408
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
2409
|
+
|
2410
|
+
|
2411
|
+
|
2412
|
+
—
|
2413
|
+
<div class='inline'>
|
2414
|
+
<p>the animation interval.</p>
|
2415
|
+
</div>
|
2416
|
+
|
2417
|
+
</li>
|
2418
|
+
|
2419
|
+
</ul>
|
2420
|
+
|
2421
|
+
<p class="tag_title">Returns:</p>
|
2422
|
+
<ul class="return">
|
2423
|
+
|
2424
|
+
<li>
|
2425
|
+
|
2426
|
+
|
2427
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
|
2428
|
+
|
2429
|
+
|
2430
|
+
|
2431
|
+
—
|
2432
|
+
<div class='inline'>
|
2433
|
+
<p>the receiver.</p>
|
2434
|
+
</div>
|
2435
|
+
|
2436
|
+
</li>
|
2437
|
+
|
2438
|
+
</ul>
|
2439
|
+
|
2440
|
+
</div><table class="source_code">
|
2441
|
+
<tr>
|
2442
|
+
<td>
|
2443
|
+
<pre class="lines">
|
2444
|
+
|
2056
2445
|
|
2446
|
+
911</pre>
|
2447
|
+
</td>
|
2448
|
+
<td>
|
2449
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 911</span>
|
2450
|
+
|
2451
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rotate_to'>rotate_to</span><span class='lparen'>(</span><span class='id identifier rubyid_angle'>angle</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2452
|
+
</td>
|
2453
|
+
</tr>
|
2454
|
+
</table>
|
2057
2455
|
</div>
|
2456
|
+
|
2457
|
+
</div>
|
2058
2458
|
|
2059
|
-
|
2060
|
-
|
2459
|
+
</div>
|
2460
|
+
|
2461
|
+
<div id="footer">
|
2462
|
+
Generated on Sun Nov 27 15:52:19 2016 by
|
2061
2463
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2062
|
-
0.
|
2464
|
+
0.9.5 (ruby-2.3.3).
|
2063
2465
|
</div>
|
2064
2466
|
|
2467
|
+
</div>
|
2065
2468
|
</body>
|
2066
2469
|
</html>
|