motion-game 1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/build/android/armeabi/libchipmunk.a +0 -0
  3. data/build/android/armeabi/libcrypto.a +0 -0
  4. data/build/android/armeabi/libcurl.a +0 -0
  5. data/build/android/armeabi/libfreetype.a +0 -0
  6. data/build/android/armeabi/libjpeg.a +0 -0
  7. data/build/android/armeabi/libmotion-cocos.a +0 -0
  8. data/build/android/armeabi/libpng.a +0 -0
  9. data/build/android/armeabi/libssl.a +0 -0
  10. data/build/android/armeabi/libtiff.a +0 -0
  11. data/build/android/armeabi/libwebp.a +0 -0
  12. data/build/android/armeabi/libwebsockets.a +0 -0
  13. data/build/android/motion-cocos.jar +0 -0
  14. data/build/android/x86/libchipmunk.a +0 -0
  15. data/build/android/x86/libcrypto.a +0 -0
  16. data/build/android/x86/libcurl.a +0 -0
  17. data/build/android/x86/libfreetype.a +0 -0
  18. data/build/android/x86/libjpeg.a +0 -0
  19. data/build/android/x86/libmotion-cocos.a +0 -0
  20. data/build/android/x86/libpng.a +0 -0
  21. data/build/android/x86/libssl.a +0 -0
  22. data/build/android/x86/libtiff.a +0 -0
  23. data/build/android/x86/libwebp.a +0 -0
  24. data/build/android/x86/libwebsockets.a +0 -0
  25. data/build/ios/libchipmunk.a +0 -0
  26. data/build/ios/libcurl.a +0 -0
  27. data/build/ios/libfreetype.a +0 -0
  28. data/build/ios/libjpeg.a +0 -0
  29. data/build/ios/libmotion-cocos.a +0 -0
  30. data/build/ios/libpng.a +0 -0
  31. data/build/ios/libtiff.a +0 -0
  32. data/build/ios/libwebp.a +0 -0
  33. data/build/ios/libwebsockets.a +0 -0
  34. data/doc/MG.html +129 -0
  35. data/doc/MG/Application.html +332 -0
  36. data/doc/MG/Audio.html +1049 -0
  37. data/doc/MG/Button.html +722 -0
  38. data/doc/MG/Color.html +528 -0
  39. data/doc/MG/Director.html +1140 -0
  40. data/doc/MG/Draw.html +437 -0
  41. data/doc/MG/Events.html +127 -0
  42. data/doc/MG/Events/Acceleration.html +502 -0
  43. data/doc/MG/Events/Touch.html +232 -0
  44. data/doc/MG/Layout.html +513 -0
  45. data/doc/MG/List.html +1050 -0
  46. data/doc/MG/Node.html +1752 -0
  47. data/doc/MG/Parallax.html +294 -0
  48. data/doc/MG/Particle.html +1221 -0
  49. data/doc/MG/Point.html +540 -0
  50. data/doc/MG/Scene.html +1250 -0
  51. data/doc/MG/Scroll.html +530 -0
  52. data/doc/MG/Size.html +737 -0
  53. data/doc/MG/Slider.html +335 -0
  54. data/doc/MG/Sprite.html +2066 -0
  55. data/doc/MG/Text.html +918 -0
  56. data/doc/MG/Web.html +828 -0
  57. data/doc/MG/Widget.html +460 -0
  58. data/doc/_index.html +362 -0
  59. data/doc/class_list.html +58 -0
  60. data/doc/css/common.css +1 -0
  61. data/doc/css/full_list.css +57 -0
  62. data/doc/css/style.css +339 -0
  63. data/doc/file.README.html +114 -0
  64. data/doc/file_list.html +60 -0
  65. data/doc/frames.html +26 -0
  66. data/doc/index.html +114 -0
  67. data/doc/js/app.js +219 -0
  68. data/doc/js/full_list.js +181 -0
  69. data/doc/js/jquery.js +4 -0
  70. data/doc/method_list.html +933 -0
  71. data/doc/top-level-namespace.html +112 -0
  72. data/lib/motion-game.rb +1 -0
  73. data/lib/motion-game/android.rb +23 -0
  74. data/lib/motion-game/android/main_activity.rb +2 -0
  75. data/lib/motion-game/ios.rb +14 -0
  76. data/lib/motion-game/ios/app_delegate.rb +20 -0
  77. data/lib/motion-game/ios/root_view_controller.rb +14 -0
  78. data/lib/motion-game/project.rb +1 -0
  79. data/lib/motion-game/shortcuts.rb +177 -0
  80. data/template/motion-game/files/Gemfile +5 -0
  81. data/template/motion-game/files/Rakefile +12 -0
  82. data/template/motion-game/files/app/application.rb +5 -0
  83. data/template/motion-game/files/app/main_scene.rb +7 -0
  84. data/template/motion-game/files/config/android.rb.erb +6 -0
  85. data/template/motion-game/files/config/ios.rb.erb +6 -0
  86. metadata +130 -0
@@ -0,0 +1,335 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: MG::Slider
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!MG/Slider.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
36
+ &raquo;
37
+ <span class="title">Slider</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: MG::Slider
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Widget.html" title="MG::Widget (class)">Widget</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></li>
82
+
83
+ <li class="next"><span class='object_link'><a href="Widget.html" title="MG::Widget (class)">Widget</a></span></li>
84
+
85
+ <li class="next">MG::Slider</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r2 last">Defined in:</dt>
101
+ <dd class="r2 last">motion-game</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Properties <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#progress-instance_method" title="#progress (instance method)">- (Integer) <strong>progress</strong> </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'>
134
+ <p>The progress direction of the slider, as a percentage value from
135
+ <code>1</code> to <code>100</code>.</p>
136
+ </div></span>
137
+
138
+ </li>
139
+
140
+
141
+ </ul>
142
+
143
+
144
+
145
+
146
+
147
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Widget.html" title="MG::Widget (class)">Widget</a></span></h3>
148
+ <p class="inherited"><span class='object_link'><a href="Widget.html#enabled%3F-instance_method" title="MG::Widget#enabled? (method)">#enabled?</a></span>, <span class='object_link'><a href="Widget.html#highlighted%3F-instance_method" title="MG::Widget#highlighted? (method)">#highlighted?</a></span></p>
149
+
150
+
151
+
152
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
153
+ <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>
154
+
155
+
156
+
157
+ <h2>
158
+ Constructors
159
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
160
+ </h2>
161
+
162
+ <ul class="summary">
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Slider) <strong>initialize</strong> </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+ <span class="note title constructor">constructor</span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'>
184
+ <p>Creates a new Slider widget.</p>
185
+ </div></span>
186
+
187
+ </li>
188
+
189
+
190
+ </ul>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Widget.html" title="MG::Widget (class)">Widget</a></span></h3>
203
+ <p class="inherited"><span class='object_link'><a href="Widget.html#on_touch-instance_method" title="MG::Widget#on_touch (method)">#on_touch</a></span></p>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
214
+ <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>
215
+ <div id="constructor_details" class="method_details_list">
216
+ <h2>Constructor Details</h2>
217
+
218
+ <div class="method_details first">
219
+ <h3 class="signature first" id="initialize-instance_method">
220
+
221
+ - (<tt><span class='object_link'><a href="" title="MG::Slider (class)">Slider</a></span></tt>) <strong>initialize</strong>
222
+
223
+
224
+
225
+
226
+
227
+ </h3><div class="docstring">
228
+ <div class="discussion">
229
+
230
+ <p>Creates a new Slider widget.</p>
231
+
232
+
233
+ </div>
234
+ </div>
235
+ <div class="tags">
236
+
237
+
238
+ </div><table class="source_code">
239
+ <tr>
240
+ <td>
241
+ <pre class="lines">
242
+
243
+
244
+ 772</pre>
245
+ </td>
246
+ <td>
247
+ <pre class="code"><span class="info file"># File 'motion-game', line 772</span>
248
+
249
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
250
+ </td>
251
+ </tr>
252
+ </table>
253
+ </div>
254
+
255
+ </div>
256
+
257
+ <div id="instance_attr_details" class="attr_details">
258
+ <h2>Instance Attribute Details</h2>
259
+
260
+
261
+ <span id="progress=-instance_method"></span>
262
+ <div class="method_details first">
263
+ <h3 class="signature first" id="progress-instance_method">
264
+
265
+ - (<tt>Integer</tt>) <strong>progress</strong>
266
+
267
+
268
+
269
+
270
+
271
+ </h3><div class="docstring">
272
+ <div class="discussion">
273
+
274
+ <p>Returns the progress direction of the slider, as a percentage value from
275
+ <code>1</code> to <code>100</code>.</p>
276
+
277
+
278
+ </div>
279
+ </div>
280
+ <div class="tags">
281
+
282
+ <p class="tag_title">Returns:</p>
283
+ <ul class="return">
284
+
285
+ <li>
286
+
287
+
288
+ <span class='type'>(<tt>Integer</tt>)</span>
289
+
290
+
291
+
292
+ &mdash;
293
+ <div class='inline'>
294
+ <p>the progress direction of the slider, as a percentage value from
295
+ <code>1</code> to <code>100</code>.</p>
296
+ </div>
297
+
298
+ </li>
299
+
300
+ </ul>
301
+
302
+ </div><table class="source_code">
303
+ <tr>
304
+ <td>
305
+ <pre class="lines">
306
+
307
+
308
+ 779
309
+ 780
310
+ 781</pre>
311
+ </td>
312
+ <td>
313
+ <pre class="code"><span class="info file"># File 'motion-game', line 779</span>
314
+
315
+ <span class='kw'>def</span> <span class='id identifier rubyid_progress'>progress</span>
316
+ <span class='ivar'>@progress</span>
317
+ <span class='kw'>end</span></pre>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+ </div>
322
+
323
+ </div>
324
+
325
+
326
+ </div>
327
+
328
+ <div id="footer">
329
+ Generated on Thu Sep 3 15:12:08 2015 by
330
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
331
+ 0.8.7.6 (ruby-2.0.0).
332
+ </div>
333
+
334
+ </body>
335
+ </html>
@@ -0,0 +1,2066 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: MG::Sprite
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!MG/Sprite.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
36
+ &raquo;
37
+ <span class="title">Sprite</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: MG::Sprite
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></li>
82
+
83
+ <li class="next">MG::Sprite</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">motion-game</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+ <h2>Properties <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#category_mask-instance_method" title="#category_mask (instance method)">- (Integer) <strong>category_mask</strong> </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Physics category mask.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ <li class="public ">
139
+ <span class="summary_signature">
140
+
141
+ <a href="#collision_mask-instance_method" title="#collision_mask (instance method)">- (Integer) <strong>collision_mask</strong> </a>
142
+
143
+
144
+
145
+ </span>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'>
159
+ <p>Physics collision mask.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#contact_mask-instance_method" title="#contact_mask (instance method)">- (Integer) <strong>contact_mask</strong> </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>Physics contact test mask.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ <li class="public ">
193
+ <span class="summary_signature">
194
+
195
+ <a href="#dynamic%3F-instance_method" title="#dynamic? (instance method)">- (Boolean) <strong>dynamic?</strong> </a>
196
+
197
+
198
+
199
+ </span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <span class="summary_desc"><div class='inline'>
213
+ <p>Whether the sprite body should be dynamic or not in the physics world.</p>
214
+ </div></span>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#friction-instance_method" title="#friction (instance method)">- (Float) <strong>friction</strong> </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>The linear damping / air friction force on the sprite body.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ <li class="public ">
247
+ <span class="summary_signature">
248
+
249
+ <a href="#gravitates%3F-instance_method" title="#gravitates? (instance method)">- (Boolean) <strong>gravitates?</strong> </a>
250
+
251
+
252
+
253
+ </span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'>
267
+ <p>Whether the sprite should be affected by the scene&#39;s gravitational
268
+ force.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#inertia_moment-instance_method" title="#inertia_moment (instance method)">- (Float) <strong>inertia_moment</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+ <span class="summary_desc"><div class='inline'>
295
+ <p>The moment of inertia of the body.</p>
296
+ </div></span>
297
+
298
+ </li>
299
+
300
+
301
+ <li class="public ">
302
+ <span class="summary_signature">
303
+
304
+ <a href="#mass-instance_method" title="#mass (instance method)">- (Float) <strong>mass</strong> </a>
305
+
306
+
307
+
308
+ </span>
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="summary_desc"><div class='inline'>
322
+ <p>The body mass of the sprite.</p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ <li class="public ">
329
+ <span class="summary_signature">
330
+
331
+ <a href="#resting%3F-instance_method" title="#resting? (instance method)">- (Boolean) <strong>resting?</strong> </a>
332
+
333
+
334
+
335
+ </span>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+ <span class="summary_desc"><div class='inline'>
349
+ <p>Whether the body is at rest.</p>
350
+ </div></span>
351
+
352
+ </li>
353
+
354
+
355
+ <li class="public ">
356
+ <span class="summary_signature">
357
+
358
+ <a href="#velocity-instance_method" title="#velocity (instance method)">- (Point) <strong>velocity</strong> </a>
359
+
360
+
361
+
362
+ </span>
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+ <span class="summary_desc"><div class='inline'>
376
+ <p>The velocity force on the sprite body.</p>
377
+ </div></span>
378
+
379
+ </li>
380
+
381
+
382
+ </ul>
383
+
384
+
385
+
386
+
387
+
388
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="MG::Node (class)">Node</a></span></h3>
389
+ <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>
390
+
391
+
392
+
393
+ <h2>
394
+ Spritesheets
395
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
396
+ </h2>
397
+
398
+ <ul class="summary">
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
403
+ <a href="#load-class_method" title="load (class method)">+ (nil) <strong>load</strong>(file_name) </a>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <span class="summary_desc"><div class='inline'>
418
+ <p>Loads all sprites from the content of <code>file_name</code>, which should
419
+ be the name of a property list spritesheet file in the application&#39;s
420
+ resource directory.</p>
421
+ </div></span>
422
+
423
+ </li>
424
+
425
+
426
+ </ul>
427
+
428
+ <h2>
429
+ Constructors
430
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
431
+ </h2>
432
+
433
+ <ul class="summary">
434
+
435
+ <li class="public ">
436
+ <span class="summary_signature">
437
+
438
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Sprite) <strong>initialize</strong>(sprite_name) </a>
439
+
440
+
441
+
442
+ </span>
443
+
444
+
445
+ <span class="note title constructor">constructor</span>
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+ <span class="summary_desc"><div class='inline'>
455
+ <p>Creates a new sprite object from <code>sprite_name</code>, which must be
456
+ either the name of a standalone image file in the application&#39;s
457
+ resource directory or the name of a sprite frame which was loaded from a
458
+ spritesheet using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.load (method)">Sprite.load</a></span>.</p>
459
+ </div></span>
460
+
461
+ </li>
462
+
463
+
464
+ </ul>
465
+
466
+ <h2>
467
+ Actions
468
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
469
+ </h2>
470
+
471
+ <ul class="summary">
472
+
473
+ <li class="public ">
474
+ <span class="summary_signature">
475
+
476
+ <a href="#animate-instance_method" title="#animate (instance method)">- (Sprite) <strong>animate</strong>(frame_names, delay, loops = 1) </a>
477
+
478
+
479
+
480
+ </span>
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+ <span class="summary_desc"><div class='inline'>
491
+ <p>Starts an animation where the sprite display frame will be changed to the
492
+ given frames in <code>sprite_frames_names</code> based on the given
493
+ <code>delay</code> and repeated <code>loops</code> times.</p>
494
+ </div></span>
495
+
496
+ </li>
497
+
498
+
499
+ <li class="public ">
500
+ <span class="summary_signature">
501
+
502
+ <a href="#blink-instance_method" title="#blink (instance method)">- (Sprite) <strong>blink</strong>(number_of_blinks, interval) </a>
503
+
504
+
505
+
506
+ </span>
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+ <span class="summary_desc"><div class='inline'>
517
+ <p>Blinks the receiver.</p>
518
+ </div></span>
519
+
520
+ </li>
521
+
522
+
523
+ <li class="public ">
524
+ <span class="summary_signature">
525
+
526
+ <a href="#move_by-instance_method" title="#move_by (instance method)">- (Sprite) <strong>move_by</strong>(delta_location, interval) </a>
527
+
528
+
529
+
530
+ </span>
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+ <span class="summary_desc"><div class='inline'>
541
+ <p>Moves the position of the receiver to a new location determined by the sum
542
+ of the current location and the given <code>delta_location</code> object.</p>
543
+ </div></span>
544
+
545
+ </li>
546
+
547
+
548
+ <li class="public ">
549
+ <span class="summary_signature">
550
+
551
+ <a href="#move_to-instance_method" title="#move_to (instance method)">- (Sprite) <strong>move_to</strong>(location, interval) </a>
552
+
553
+
554
+
555
+ </span>
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+ <span class="summary_desc"><div class='inline'>
566
+ <p>Moves the position of the receiver to a new given location.</p>
567
+ </div></span>
568
+
569
+ </li>
570
+
571
+
572
+ </ul>
573
+
574
+ <h2>
575
+ Physics
576
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
577
+ </h2>
578
+
579
+ <ul class="summary">
580
+
581
+ <li class="public ">
582
+ <span class="summary_signature">
583
+
584
+ <a href="#apply_force-instance_method" title="#apply_force (instance method)">- (Sprite) <strong>apply_force</strong>(force) </a>
585
+
586
+
587
+
588
+ </span>
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+ <span class="summary_desc"><div class='inline'>
599
+ <p>Applies an immediate force to the sprite body.</p>
600
+ </div></span>
601
+
602
+ </li>
603
+
604
+
605
+ <li class="public ">
606
+ <span class="summary_signature">
607
+
608
+ <a href="#apply_impulse-instance_method" title="#apply_impulse (instance method)">- (Sprite) <strong>apply_impulse</strong>(force) </a>
609
+
610
+
611
+
612
+ </span>
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+ <span class="summary_desc"><div class='inline'>
623
+ <p>Applies a continuous force to the sprite body.</p>
624
+ </div></span>
625
+
626
+ </li>
627
+
628
+
629
+ <li class="public ">
630
+ <span class="summary_signature">
631
+
632
+ <a href="#attach_physics_box-instance_method" title="#attach_physics_box (instance method)">- (Sprite) <strong>attach_physics_box</strong>(size = nil) </a>
633
+
634
+
635
+
636
+ </span>
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+ <span class="summary_desc"><div class='inline'>
647
+ <p>Attaches a physics body with a box shape to the sprite.</p>
648
+ </div></span>
649
+
650
+ </li>
651
+
652
+
653
+ </ul>
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+ <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>
667
+ <div id="constructor_details" class="method_details_list">
668
+ <h2>Constructor Details</h2>
669
+
670
+ <div class="method_details first">
671
+ <h3 class="signature first" id="initialize-instance_method">
672
+
673
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>initialize</strong>(sprite_name)
674
+
675
+
676
+
677
+
678
+
679
+ </h3><div class="docstring">
680
+ <div class="discussion">
681
+
682
+ <p>Creates a new sprite object from <code>sprite_name</code>, which must be
683
+ either the name of a standalone image file in the application&#39;s
684
+ resource directory or the name of a sprite frame which was loaded from a
685
+ spritesheet using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.load (method)">load</a></span>.</p>
686
+
687
+
688
+ </div>
689
+ </div>
690
+ <div class="tags">
691
+ <p class="tag_title">Parameters:</p>
692
+ <ul class="param">
693
+
694
+ <li>
695
+
696
+ <span class='name'>sprite_name</span>
697
+
698
+
699
+ <span class='type'>(<tt>String</tt>)</span>
700
+
701
+
702
+
703
+ &mdash;
704
+ <div class='inline'>
705
+ <p>the name of the sprite to create.</p>
706
+ </div>
707
+
708
+ </li>
709
+
710
+ </ul>
711
+
712
+
713
+ </div><table class="source_code">
714
+ <tr>
715
+ <td>
716
+ <pre class="lines">
717
+
718
+
719
+ 454</pre>
720
+ </td>
721
+ <td>
722
+ <pre class="code"><span class="info file"># File 'motion-game', line 454</span>
723
+
724
+ <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
+ </td>
726
+ </tr>
727
+ </table>
728
+ </div>
729
+
730
+ </div>
731
+
732
+ <div id="instance_attr_details" class="attr_details">
733
+ <h2>Instance Attribute Details</h2>
734
+
735
+
736
+ <span id="category_mask=-instance_method"></span>
737
+ <div class="method_details first">
738
+ <h3 class="signature first" id="category_mask-instance_method">
739
+
740
+ - (<tt>Integer</tt>) <strong>category_mask</strong>
741
+
742
+
743
+
744
+
745
+
746
+ </h3><div class="docstring">
747
+ <div class="discussion">
748
+
749
+ <p>Returns physics category mask.</p>
750
+
751
+
752
+ </div>
753
+ </div>
754
+ <div class="tags">
755
+
756
+ <p class="tag_title">Returns:</p>
757
+ <ul class="return">
758
+
759
+ <li>
760
+
761
+
762
+ <span class='type'>(<tt>Integer</tt>)</span>
763
+
764
+
765
+
766
+ &mdash;
767
+ <div class='inline'>
768
+ <p>physics category mask.</p>
769
+ </div>
770
+
771
+ </li>
772
+
773
+ </ul>
774
+
775
+ </div><table class="source_code">
776
+ <tr>
777
+ <td>
778
+ <pre class="lines">
779
+
780
+
781
+ 540
782
+ 541
783
+ 542</pre>
784
+ </td>
785
+ <td>
786
+ <pre class="code"><span class="info file"># File 'motion-game', line 540</span>
787
+
788
+ <span class='kw'>def</span> <span class='id identifier rubyid_category_mask'>category_mask</span>
789
+ <span class='ivar'>@category_mask</span>
790
+ <span class='kw'>end</span></pre>
791
+ </td>
792
+ </tr>
793
+ </table>
794
+ </div>
795
+
796
+
797
+ <span id="collision_mask=-instance_method"></span>
798
+ <div class="method_details ">
799
+ <h3 class="signature " id="collision_mask-instance_method">
800
+
801
+ - (<tt>Integer</tt>) <strong>collision_mask</strong>
802
+
803
+
804
+
805
+
806
+
807
+ </h3><div class="docstring">
808
+ <div class="discussion">
809
+
810
+ <p>Returns physics collision mask.</p>
811
+
812
+
813
+ </div>
814
+ </div>
815
+ <div class="tags">
816
+
817
+ <p class="tag_title">Returns:</p>
818
+ <ul class="return">
819
+
820
+ <li>
821
+
822
+
823
+ <span class='type'>(<tt>Integer</tt>)</span>
824
+
825
+
826
+
827
+ &mdash;
828
+ <div class='inline'>
829
+ <p>physics collision mask.</p>
830
+ </div>
831
+
832
+ </li>
833
+
834
+ </ul>
835
+
836
+ </div><table class="source_code">
837
+ <tr>
838
+ <td>
839
+ <pre class="lines">
840
+
841
+
842
+ 546
843
+ 547
844
+ 548</pre>
845
+ </td>
846
+ <td>
847
+ <pre class="code"><span class="info file"># File 'motion-game', line 546</span>
848
+
849
+ <span class='kw'>def</span> <span class='id identifier rubyid_collision_mask'>collision_mask</span>
850
+ <span class='ivar'>@collision_mask</span>
851
+ <span class='kw'>end</span></pre>
852
+ </td>
853
+ </tr>
854
+ </table>
855
+ </div>
856
+
857
+
858
+ <span id="contact_mask=-instance_method"></span>
859
+ <div class="method_details ">
860
+ <h3 class="signature " id="contact_mask-instance_method">
861
+
862
+ - (<tt>Integer</tt>) <strong>contact_mask</strong>
863
+
864
+
865
+
866
+
867
+
868
+ </h3><div class="docstring">
869
+ <div class="discussion">
870
+
871
+ <p>Returns physics contact test mask.</p>
872
+
873
+
874
+ </div>
875
+ </div>
876
+ <div class="tags">
877
+
878
+ <p class="tag_title">Returns:</p>
879
+ <ul class="return">
880
+
881
+ <li>
882
+
883
+
884
+ <span class='type'>(<tt>Integer</tt>)</span>
885
+
886
+
887
+
888
+ &mdash;
889
+ <div class='inline'>
890
+ <p>physics contact test mask.</p>
891
+ </div>
892
+
893
+ </li>
894
+
895
+ </ul>
896
+
897
+ </div><table class="source_code">
898
+ <tr>
899
+ <td>
900
+ <pre class="lines">
901
+
902
+
903
+ 543
904
+ 544
905
+ 545</pre>
906
+ </td>
907
+ <td>
908
+ <pre class="code"><span class="info file"># File 'motion-game', line 543</span>
909
+
910
+ <span class='kw'>def</span> <span class='id identifier rubyid_contact_mask'>contact_mask</span>
911
+ <span class='ivar'>@contact_mask</span>
912
+ <span class='kw'>end</span></pre>
913
+ </td>
914
+ </tr>
915
+ </table>
916
+ </div>
917
+
918
+
919
+ <span id="dynamic?=-instance_method"></span>
920
+ <div class="method_details ">
921
+ <h3 class="signature " id="dynamic?-instance_method">
922
+
923
+ - (<tt>Boolean</tt>) <strong>dynamic?</strong>
924
+
925
+
926
+
927
+
928
+
929
+ </h3><div class="docstring">
930
+ <div class="discussion">
931
+
932
+ <p>Returns whether the sprite body should be dynamic or not in the physics
933
+ world. The default is <code>true</code>, and a dynamic body will affect
934
+ with gravity.</p>
935
+
936
+
937
+ </div>
938
+ </div>
939
+ <div class="tags">
940
+
941
+ <p class="tag_title">Returns:</p>
942
+ <ul class="return">
943
+
944
+ <li>
945
+
946
+
947
+ <span class='type'>(<tt>Boolean</tt>)</span>
948
+
949
+
950
+
951
+ &mdash;
952
+ <div class='inline'>
953
+ <p>whether the sprite body should be dynamic or not in the physics world. The
954
+ default is <code>true</code>, and a dynamic body will affect with gravity.</p>
955
+ </div>
956
+
957
+ </li>
958
+
959
+ </ul>
960
+
961
+ </div><table class="source_code">
962
+ <tr>
963
+ <td>
964
+ <pre class="lines">
965
+
966
+
967
+ 525
968
+ 526
969
+ 527</pre>
970
+ </td>
971
+ <td>
972
+ <pre class="code"><span class="info file"># File 'motion-game', line 525</span>
973
+
974
+ def dynamic?
975
+ @dynamic?
976
+ end</pre>
977
+ </td>
978
+ </tr>
979
+ </table>
980
+ </div>
981
+
982
+
983
+ <span id="friction=-instance_method"></span>
984
+ <div class="method_details ">
985
+ <h3 class="signature " id="friction-instance_method">
986
+
987
+ - (<tt>Float</tt>) <strong>friction</strong>
988
+
989
+
990
+
991
+
992
+
993
+ </h3><div class="docstring">
994
+ <div class="discussion">
995
+
996
+ <p>Returns the linear damping / air friction force on the sprite body.</p>
997
+
998
+
999
+ </div>
1000
+ </div>
1001
+ <div class="tags">
1002
+
1003
+ <p class="tag_title">Returns:</p>
1004
+ <ul class="return">
1005
+
1006
+ <li>
1007
+
1008
+
1009
+ <span class='type'>(<tt>Float</tt>)</span>
1010
+
1011
+
1012
+
1013
+ &mdash;
1014
+ <div class='inline'>
1015
+ <p>the linear damping / air friction force on the sprite body.</p>
1016
+ </div>
1017
+
1018
+ </li>
1019
+
1020
+ </ul>
1021
+
1022
+ </div><table class="source_code">
1023
+ <tr>
1024
+ <td>
1025
+ <pre class="lines">
1026
+
1027
+
1028
+ 528
1029
+ 529
1030
+ 530</pre>
1031
+ </td>
1032
+ <td>
1033
+ <pre class="code"><span class="info file"># File 'motion-game', line 528</span>
1034
+
1035
+ <span class='kw'>def</span> <span class='id identifier rubyid_friction'>friction</span>
1036
+ <span class='ivar'>@friction</span>
1037
+ <span class='kw'>end</span></pre>
1038
+ </td>
1039
+ </tr>
1040
+ </table>
1041
+ </div>
1042
+
1043
+
1044
+ <span id="gravitates?=-instance_method"></span>
1045
+ <div class="method_details ">
1046
+ <h3 class="signature " id="gravitates?-instance_method">
1047
+
1048
+ - (<tt>Boolean</tt>) <strong>gravitates?</strong>
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+ </h3><div class="docstring">
1055
+ <div class="discussion">
1056
+
1057
+ <p>Returns whether the sprite should be affected by the scene&#39;s
1058
+ gravitational force. The default is <code>true</code>.</p>
1059
+
1060
+
1061
+ </div>
1062
+ </div>
1063
+ <div class="tags">
1064
+
1065
+ <p class="tag_title">Returns:</p>
1066
+ <ul class="return">
1067
+
1068
+ <li>
1069
+
1070
+
1071
+ <span class='type'>(<tt>Boolean</tt>)</span>
1072
+
1073
+
1074
+
1075
+ &mdash;
1076
+ <div class='inline'>
1077
+ <p>whether the sprite should be affected by the scene&#39;s gravitational
1078
+ force. The default is <code>true</code>.</p>
1079
+ </div>
1080
+
1081
+ </li>
1082
+
1083
+ </ul>
1084
+
1085
+ </div><table class="source_code">
1086
+ <tr>
1087
+ <td>
1088
+ <pre class="lines">
1089
+
1090
+
1091
+ 520
1092
+ 521
1093
+ 522</pre>
1094
+ </td>
1095
+ <td>
1096
+ <pre class="code"><span class="info file"># File 'motion-game', line 520</span>
1097
+
1098
+ def gravitates?
1099
+ @gravitates?
1100
+ end</pre>
1101
+ </td>
1102
+ </tr>
1103
+ </table>
1104
+ </div>
1105
+
1106
+
1107
+ <span id="inertia_moment=-instance_method"></span>
1108
+ <div class="method_details ">
1109
+ <h3 class="signature " id="inertia_moment-instance_method">
1110
+
1111
+ - (<tt>Float</tt>) <strong>inertia_moment</strong>
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+ </h3><div class="docstring">
1118
+ <div class="discussion">
1119
+
1120
+ <p>Returns the moment of inertia of the body.</p>
1121
+
1122
+
1123
+ </div>
1124
+ </div>
1125
+ <div class="tags">
1126
+
1127
+ <p class="tag_title">Returns:</p>
1128
+ <ul class="return">
1129
+
1130
+ <li>
1131
+
1132
+
1133
+ <span class='type'>(<tt>Float</tt>)</span>
1134
+
1135
+
1136
+
1137
+ &mdash;
1138
+ <div class='inline'>
1139
+ <p>the moment of inertia of the body.</p>
1140
+ </div>
1141
+
1142
+ </li>
1143
+
1144
+ </ul>
1145
+
1146
+ </div><table class="source_code">
1147
+ <tr>
1148
+ <td>
1149
+ <pre class="lines">
1150
+
1151
+
1152
+ 537
1153
+ 538
1154
+ 539</pre>
1155
+ </td>
1156
+ <td>
1157
+ <pre class="code"><span class="info file"># File 'motion-game', line 537</span>
1158
+
1159
+ <span class='kw'>def</span> <span class='id identifier rubyid_inertia_moment'>inertia_moment</span>
1160
+ <span class='ivar'>@inertia_moment</span>
1161
+ <span class='kw'>end</span></pre>
1162
+ </td>
1163
+ </tr>
1164
+ </table>
1165
+ </div>
1166
+
1167
+
1168
+ <span id="mass=-instance_method"></span>
1169
+ <div class="method_details ">
1170
+ <h3 class="signature " id="mass-instance_method">
1171
+
1172
+ - (<tt>Float</tt>) <strong>mass</strong>
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+ </h3><div class="docstring">
1179
+ <div class="discussion">
1180
+
1181
+ <p>Returns the body mass of the sprite.</p>
1182
+
1183
+
1184
+ </div>
1185
+ </div>
1186
+ <div class="tags">
1187
+
1188
+ <p class="tag_title">Returns:</p>
1189
+ <ul class="return">
1190
+
1191
+ <li>
1192
+
1193
+
1194
+ <span class='type'>(<tt>Float</tt>)</span>
1195
+
1196
+
1197
+
1198
+ &mdash;
1199
+ <div class='inline'>
1200
+ <p>the body mass of the sprite.</p>
1201
+ </div>
1202
+
1203
+ </li>
1204
+
1205
+ </ul>
1206
+
1207
+ </div><table class="source_code">
1208
+ <tr>
1209
+ <td>
1210
+ <pre class="lines">
1211
+
1212
+
1213
+ 516
1214
+ 517
1215
+ 518</pre>
1216
+ </td>
1217
+ <td>
1218
+ <pre class="code"><span class="info file"># File 'motion-game', line 516</span>
1219
+
1220
+ <span class='kw'>def</span> <span class='id identifier rubyid_mass'>mass</span>
1221
+ <span class='ivar'>@mass</span>
1222
+ <span class='kw'>end</span></pre>
1223
+ </td>
1224
+ </tr>
1225
+ </table>
1226
+ </div>
1227
+
1228
+
1229
+ <span id="resting?=-instance_method"></span>
1230
+ <div class="method_details ">
1231
+ <h3 class="signature " id="resting?-instance_method">
1232
+
1233
+ - (<tt>Boolean</tt>) <strong>resting?</strong>
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+ </h3><div class="docstring">
1240
+ <div class="discussion">
1241
+
1242
+ <p>Returns whether the body is at rest.</p>
1243
+
1244
+
1245
+ </div>
1246
+ </div>
1247
+ <div class="tags">
1248
+
1249
+ <p class="tag_title">Returns:</p>
1250
+ <ul class="return">
1251
+
1252
+ <li>
1253
+
1254
+
1255
+ <span class='type'>(<tt>Boolean</tt>)</span>
1256
+
1257
+
1258
+
1259
+ &mdash;
1260
+ <div class='inline'>
1261
+ <p>whether the body is at rest.</p>
1262
+ </div>
1263
+
1264
+ </li>
1265
+
1266
+ </ul>
1267
+
1268
+ </div><table class="source_code">
1269
+ <tr>
1270
+ <td>
1271
+ <pre class="lines">
1272
+
1273
+
1274
+ 534
1275
+ 535
1276
+ 536</pre>
1277
+ </td>
1278
+ <td>
1279
+ <pre class="code"><span class="info file"># File 'motion-game', line 534</span>
1280
+
1281
+ def resting?
1282
+ @resting?
1283
+ end</pre>
1284
+ </td>
1285
+ </tr>
1286
+ </table>
1287
+ </div>
1288
+
1289
+
1290
+ <span id="velocity=-instance_method"></span>
1291
+ <div class="method_details ">
1292
+ <h3 class="signature " id="velocity-instance_method">
1293
+
1294
+ - (<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>) <strong>velocity</strong>
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+ </h3><div class="docstring">
1301
+ <div class="discussion">
1302
+
1303
+ <p>Returns the velocity force on the sprite body.</p>
1304
+
1305
+
1306
+ </div>
1307
+ </div>
1308
+ <div class="tags">
1309
+
1310
+ <p class="tag_title">Returns:</p>
1311
+ <ul class="return">
1312
+
1313
+ <li>
1314
+
1315
+
1316
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
1317
+
1318
+
1319
+
1320
+ &mdash;
1321
+ <div class='inline'>
1322
+ <p>the velocity force on the sprite body.</p>
1323
+ </div>
1324
+
1325
+ </li>
1326
+
1327
+ </ul>
1328
+
1329
+ </div><table class="source_code">
1330
+ <tr>
1331
+ <td>
1332
+ <pre class="lines">
1333
+
1334
+
1335
+ 531
1336
+ 532
1337
+ 533</pre>
1338
+ </td>
1339
+ <td>
1340
+ <pre class="code"><span class="info file"># File 'motion-game', line 531</span>
1341
+
1342
+ <span class='kw'>def</span> <span class='id identifier rubyid_velocity'>velocity</span>
1343
+ <span class='ivar'>@velocity</span>
1344
+ <span class='kw'>end</span></pre>
1345
+ </td>
1346
+ </tr>
1347
+ </table>
1348
+ </div>
1349
+
1350
+ </div>
1351
+
1352
+
1353
+ <div id="class_method_details" class="method_details_list">
1354
+ <h2>Class Method Details</h2>
1355
+
1356
+
1357
+ <div class="method_details first">
1358
+ <h3 class="signature first" id="load-class_method">
1359
+
1360
+ + (<tt>nil</tt>) <strong>load</strong>(file_name)
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+ </h3><div class="docstring">
1367
+ <div class="discussion">
1368
+
1369
+ <p>Loads all sprites from the content of <code>file_name</code>, which should
1370
+ be the name of a property list spritesheet file in the application&#39;s
1371
+ resource directory. Once a spritesheet file is loaded, individual sprites
1372
+ can be created using <span class='object_link'><a href="#initialize-instance_method" title="MG::Sprite#initialize (method)">#initialize</a></span> by providing the name of the
1373
+ frame. Sprite frames files can be created with a visual editor such as
1374
+ TexturePacker.</p>
1375
+
1376
+
1377
+ </div>
1378
+ </div>
1379
+ <div class="tags">
1380
+ <p class="tag_title">Parameters:</p>
1381
+ <ul class="param">
1382
+
1383
+ <li>
1384
+
1385
+ <span class='name'>file_name</span>
1386
+
1387
+
1388
+ <span class='type'>(<tt>String</tt>)</span>
1389
+
1390
+
1391
+
1392
+ &mdash;
1393
+ <div class='inline'>
1394
+ <p>the name of the sprite frames property list file.</p>
1395
+ </div>
1396
+
1397
+ </li>
1398
+
1399
+ </ul>
1400
+
1401
+ <p class="tag_title">Returns:</p>
1402
+ <ul class="return">
1403
+
1404
+ <li>
1405
+
1406
+
1407
+ <span class='type'>(<tt>nil</tt>)</span>
1408
+
1409
+
1410
+
1411
+ </li>
1412
+
1413
+ </ul>
1414
+
1415
+ </div><table class="source_code">
1416
+ <tr>
1417
+ <td>
1418
+ <pre class="lines">
1419
+
1420
+
1421
+ 444</pre>
1422
+ </td>
1423
+ <td>
1424
+ <pre class="code"><span class="info file"># File 'motion-game', line 444</span>
1425
+
1426
+ <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
+ </td>
1428
+ </tr>
1429
+ </table>
1430
+ </div>
1431
+
1432
+ </div>
1433
+
1434
+ <div id="instance_method_details" class="method_details_list">
1435
+ <h2>Instance Method Details</h2>
1436
+
1437
+
1438
+ <div class="method_details first">
1439
+ <h3 class="signature first" id="animate-instance_method">
1440
+
1441
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>animate</strong>(frame_names, delay, loops = 1)
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+ </h3><div class="docstring">
1448
+ <div class="discussion">
1449
+
1450
+ <p>Starts an animation where the sprite display frame will be changed to the
1451
+ given frames in <code>sprite_frames_names</code> based on the given
1452
+ <code>delay</code> and repeated <code>loops</code> times.</p>
1453
+
1454
+
1455
+ </div>
1456
+ </div>
1457
+ <div class="tags">
1458
+ <p class="tag_title">Parameters:</p>
1459
+ <ul class="param">
1460
+
1461
+ <li>
1462
+
1463
+ <span class='name'>frame_names</span>
1464
+
1465
+
1466
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
1467
+
1468
+
1469
+
1470
+ &mdash;
1471
+ <div class='inline'>
1472
+ <p>an array of sprite frames to load and use for the animation, which can be
1473
+ either the names of standalone image files in the application&#39;s
1474
+ resource directory or the names of sprite frames loaded from a spritesheet
1475
+ using <span class='object_link'><a href="#load-class_method" title="MG::Sprite.load (method)">load</a></span>.</p>
1476
+ </div>
1477
+
1478
+ </li>
1479
+
1480
+ <li>
1481
+
1482
+ <span class='name'>delay</span>
1483
+
1484
+
1485
+ <span class='type'>(<tt>Float</tt>)</span>
1486
+
1487
+
1488
+
1489
+ &mdash;
1490
+ <div class='inline'>
1491
+ <p>the delay in seconds between each frame animation.</p>
1492
+ </div>
1493
+
1494
+ </li>
1495
+
1496
+ <li>
1497
+
1498
+ <span class='name'>loops</span>
1499
+
1500
+
1501
+ <span class='type'>(<tt>Integer</tt>, <tt>Symbol</tt>)</span>
1502
+
1503
+
1504
+ <em class="default">(defaults to: <tt>1</tt>)</em>
1505
+
1506
+
1507
+ &mdash;
1508
+ <div class='inline'>
1509
+ <p>the number of times the animation should loop. If given the
1510
+ <code>:forever</code> symbol, the animation will loop forever.</p>
1511
+ </div>
1512
+
1513
+ </li>
1514
+
1515
+ </ul>
1516
+
1517
+ <p class="tag_title">Returns:</p>
1518
+ <ul class="return">
1519
+
1520
+ <li>
1521
+
1522
+
1523
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1524
+
1525
+
1526
+
1527
+ &mdash;
1528
+ <div class='inline'>
1529
+ <p>the receiver.</p>
1530
+ </div>
1531
+
1532
+ </li>
1533
+
1534
+ </ul>
1535
+
1536
+ </div><table class="source_code">
1537
+ <tr>
1538
+ <td>
1539
+ <pre class="lines">
1540
+
1541
+
1542
+ 491</pre>
1543
+ </td>
1544
+ <td>
1545
+ <pre class="code"><span class="info file"># File 'motion-game', line 491</span>
1546
+
1547
+ <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
+ </td>
1549
+ </tr>
1550
+ </table>
1551
+ </div>
1552
+
1553
+ <div class="method_details ">
1554
+ <h3 class="signature " id="apply_force-instance_method">
1555
+
1556
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>apply_force</strong>(force)
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+ </h3><div class="docstring">
1563
+ <div class="discussion">
1564
+
1565
+ <p>Applies an immediate force to the sprite body.</p>
1566
+
1567
+
1568
+ </div>
1569
+ </div>
1570
+ <div class="tags">
1571
+ <p class="tag_title">Parameters:</p>
1572
+ <ul class="param">
1573
+
1574
+ <li>
1575
+
1576
+ <span class='name'>force</span>
1577
+
1578
+
1579
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
1580
+
1581
+
1582
+
1583
+ &mdash;
1584
+ <div class='inline'>
1585
+ <p>the force to apply.</p>
1586
+ </div>
1587
+
1588
+ </li>
1589
+
1590
+ </ul>
1591
+
1592
+ <p class="tag_title">Returns:</p>
1593
+ <ul class="return">
1594
+
1595
+ <li>
1596
+
1597
+
1598
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1599
+
1600
+
1601
+
1602
+ &mdash;
1603
+ <div class='inline'>
1604
+ <p>the receiver.</p>
1605
+ </div>
1606
+
1607
+ </li>
1608
+
1609
+ </ul>
1610
+
1611
+ </div><table class="source_code">
1612
+ <tr>
1613
+ <td>
1614
+ <pre class="lines">
1615
+
1616
+
1617
+ 510</pre>
1618
+ </td>
1619
+ <td>
1620
+ <pre class="code"><span class="info file"># File 'motion-game', line 510</span>
1621
+
1622
+ <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
+ </td>
1624
+ </tr>
1625
+ </table>
1626
+ </div>
1627
+
1628
+ <div class="method_details ">
1629
+ <h3 class="signature " id="apply_impulse-instance_method">
1630
+
1631
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>apply_impulse</strong>(force)
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+ </h3><div class="docstring">
1638
+ <div class="discussion">
1639
+
1640
+ <p>Applies a continuous force to the sprite body.</p>
1641
+
1642
+
1643
+ </div>
1644
+ </div>
1645
+ <div class="tags">
1646
+ <p class="tag_title">Parameters:</p>
1647
+ <ul class="param">
1648
+
1649
+ <li>
1650
+
1651
+ <span class='name'>force</span>
1652
+
1653
+
1654
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
1655
+
1656
+
1657
+
1658
+ &mdash;
1659
+ <div class='inline'>
1660
+ <p>the force to apply.</p>
1661
+ </div>
1662
+
1663
+ </li>
1664
+
1665
+ </ul>
1666
+
1667
+ <p class="tag_title">Returns:</p>
1668
+ <ul class="return">
1669
+
1670
+ <li>
1671
+
1672
+
1673
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1674
+
1675
+
1676
+
1677
+ &mdash;
1678
+ <div class='inline'>
1679
+ <p>the receiver.</p>
1680
+ </div>
1681
+
1682
+ </li>
1683
+
1684
+ </ul>
1685
+
1686
+ </div><table class="source_code">
1687
+ <tr>
1688
+ <td>
1689
+ <pre class="lines">
1690
+
1691
+
1692
+ 505</pre>
1693
+ </td>
1694
+ <td>
1695
+ <pre class="code"><span class="info file"># File 'motion-game', line 505</span>
1696
+
1697
+ <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
+ </td>
1699
+ </tr>
1700
+ </table>
1701
+ </div>
1702
+
1703
+ <div class="method_details ">
1704
+ <h3 class="signature " id="attach_physics_box-instance_method">
1705
+
1706
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>attach_physics_box</strong>(size = nil)
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+ </h3><div class="docstring">
1713
+ <div class="discussion">
1714
+
1715
+ <p>Attaches a physics body with a box shape to the sprite.</p>
1716
+
1717
+
1718
+ </div>
1719
+ </div>
1720
+ <div class="tags">
1721
+ <p class="tag_title">Parameters:</p>
1722
+ <ul class="param">
1723
+
1724
+ <li>
1725
+
1726
+ <span class='name'>size</span>
1727
+
1728
+
1729
+ <span class='type'>(<tt><span class='object_link'><a href="Size.html" title="MG::Size (class)">Size</a></span></tt>)</span>
1730
+
1731
+
1732
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1733
+
1734
+
1735
+ &mdash;
1736
+ <div class='inline'>
1737
+ <p>the size of the box. If <code>nil</code> is given, the size of the sprite,
1738
+ retrieved with <span class='object_link'><a href="Node.html#size-instance_method" title="MG::Node#size (method)">Node#size</a></span>, will be used instead.</p>
1739
+ </div>
1740
+
1741
+ </li>
1742
+
1743
+ </ul>
1744
+
1745
+ <p class="tag_title">Returns:</p>
1746
+ <ul class="return">
1747
+
1748
+ <li>
1749
+
1750
+
1751
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1752
+
1753
+
1754
+
1755
+ &mdash;
1756
+ <div class='inline'>
1757
+ <p>the receiver.</p>
1758
+ </div>
1759
+
1760
+ </li>
1761
+
1762
+ </ul>
1763
+
1764
+ </div><table class="source_code">
1765
+ <tr>
1766
+ <td>
1767
+ <pre class="lines">
1768
+
1769
+
1770
+ 500</pre>
1771
+ </td>
1772
+ <td>
1773
+ <pre class="code"><span class="info file"># File 'motion-game', line 500</span>
1774
+
1775
+ <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
+ </td>
1777
+ </tr>
1778
+ </table>
1779
+ </div>
1780
+
1781
+ <div class="method_details ">
1782
+ <h3 class="signature " id="blink-instance_method">
1783
+
1784
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>blink</strong>(number_of_blinks, interval)
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+ </h3><div class="docstring">
1791
+ <div class="discussion">
1792
+
1793
+ <p>Blinks the receiver.</p>
1794
+
1795
+
1796
+ </div>
1797
+ </div>
1798
+ <div class="tags">
1799
+ <p class="tag_title">Parameters:</p>
1800
+ <ul class="param">
1801
+
1802
+ <li>
1803
+
1804
+ <span class='name'>number_of_blinks</span>
1805
+
1806
+
1807
+ <span class='type'>(<tt>Integer</tt>)</span>
1808
+
1809
+
1810
+
1811
+ &mdash;
1812
+ <div class='inline'>
1813
+ <p>the number of times the receiver should blink.</p>
1814
+ </div>
1815
+
1816
+ </li>
1817
+
1818
+ <li>
1819
+
1820
+ <span class='name'>interval</span>
1821
+
1822
+
1823
+ <span class='type'>(<tt>Float</tt>)</span>
1824
+
1825
+
1826
+
1827
+ &mdash;
1828
+ <div class='inline'>
1829
+ <p>the animation interval.</p>
1830
+ </div>
1831
+
1832
+ </li>
1833
+
1834
+ </ul>
1835
+
1836
+ <p class="tag_title">Returns:</p>
1837
+ <ul class="return">
1838
+
1839
+ <li>
1840
+
1841
+
1842
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1843
+
1844
+
1845
+
1846
+ &mdash;
1847
+ <div class='inline'>
1848
+ <p>the receiver.</p>
1849
+ </div>
1850
+
1851
+ </li>
1852
+
1853
+ </ul>
1854
+
1855
+ </div><table class="source_code">
1856
+ <tr>
1857
+ <td>
1858
+ <pre class="lines">
1859
+
1860
+
1861
+ 478</pre>
1862
+ </td>
1863
+ <td>
1864
+ <pre class="code"><span class="info file"># File 'motion-game', line 478</span>
1865
+
1866
+ <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
+ </td>
1868
+ </tr>
1869
+ </table>
1870
+ </div>
1871
+
1872
+ <div class="method_details ">
1873
+ <h3 class="signature " id="move_by-instance_method">
1874
+
1875
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>move_by</strong>(delta_location, interval)
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+ </h3><div class="docstring">
1882
+ <div class="discussion">
1883
+
1884
+ <p>Moves the position of the receiver to a new location determined by the sum
1885
+ of the current location and the given <code>delta_location</code> object.</p>
1886
+
1887
+
1888
+ </div>
1889
+ </div>
1890
+ <div class="tags">
1891
+ <p class="tag_title">Parameters:</p>
1892
+ <ul class="param">
1893
+
1894
+ <li>
1895
+
1896
+ <span class='name'>delta_location</span>
1897
+
1898
+
1899
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
1900
+
1901
+
1902
+
1903
+ &mdash;
1904
+ <div class='inline'>
1905
+ <p>a point that will be added to the receiver&#39;s current location.</p>
1906
+ </div>
1907
+
1908
+ </li>
1909
+
1910
+ <li>
1911
+
1912
+ <span class='name'>interval</span>
1913
+
1914
+
1915
+ <span class='type'>(<tt>Float</tt>)</span>
1916
+
1917
+
1918
+
1919
+ &mdash;
1920
+ <div class='inline'>
1921
+ <p>the animation interval.</p>
1922
+ </div>
1923
+
1924
+ </li>
1925
+
1926
+ </ul>
1927
+
1928
+ <p class="tag_title">Returns:</p>
1929
+ <ul class="return">
1930
+
1931
+ <li>
1932
+
1933
+
1934
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
1935
+
1936
+
1937
+
1938
+ &mdash;
1939
+ <div class='inline'>
1940
+ <p>the receiver.</p>
1941
+ </div>
1942
+
1943
+ </li>
1944
+
1945
+ </ul>
1946
+
1947
+ </div><table class="source_code">
1948
+ <tr>
1949
+ <td>
1950
+ <pre class="lines">
1951
+
1952
+
1953
+ 465</pre>
1954
+ </td>
1955
+ <td>
1956
+ <pre class="code"><span class="info file"># File 'motion-game', line 465</span>
1957
+
1958
+ <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
+ </td>
1960
+ </tr>
1961
+ </table>
1962
+ </div>
1963
+
1964
+ <div class="method_details ">
1965
+ <h3 class="signature " id="move_to-instance_method">
1966
+
1967
+ - (<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>) <strong>move_to</strong>(location, interval)
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+ </h3><div class="docstring">
1974
+ <div class="discussion">
1975
+
1976
+ <p>Moves the position of the receiver to a new given location.</p>
1977
+
1978
+
1979
+ </div>
1980
+ </div>
1981
+ <div class="tags">
1982
+ <p class="tag_title">Parameters:</p>
1983
+ <ul class="param">
1984
+
1985
+ <li>
1986
+
1987
+ <span class='name'>location</span>
1988
+
1989
+
1990
+ <span class='type'>(<tt><span class='object_link'><a href="Point.html" title="MG::Point (class)">Point</a></span></tt>)</span>
1991
+
1992
+
1993
+
1994
+ &mdash;
1995
+ <div class='inline'>
1996
+ <p>where the receiver should be moved to.</p>
1997
+ </div>
1998
+
1999
+ </li>
2000
+
2001
+ <li>
2002
+
2003
+ <span class='name'>interval</span>
2004
+
2005
+
2006
+ <span class='type'>(<tt>Float</tt>)</span>
2007
+
2008
+
2009
+
2010
+ &mdash;
2011
+ <div class='inline'>
2012
+ <p>the animation interval.</p>
2013
+ </div>
2014
+
2015
+ </li>
2016
+
2017
+ </ul>
2018
+
2019
+ <p class="tag_title">Returns:</p>
2020
+ <ul class="return">
2021
+
2022
+ <li>
2023
+
2024
+
2025
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MG::Sprite (class)">Sprite</a></span></tt>)</span>
2026
+
2027
+
2028
+
2029
+ &mdash;
2030
+ <div class='inline'>
2031
+ <p>the receiver.</p>
2032
+ </div>
2033
+
2034
+ </li>
2035
+
2036
+ </ul>
2037
+
2038
+ </div><table class="source_code">
2039
+ <tr>
2040
+ <td>
2041
+ <pre class="lines">
2042
+
2043
+
2044
+ 471</pre>
2045
+ </td>
2046
+ <td>
2047
+ <pre class="code"><span class="info file"># File 'motion-game', line 471</span>
2048
+
2049
+ <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
+ </td>
2051
+ </tr>
2052
+ </table>
2053
+ </div>
2054
+
2055
+ </div>
2056
+
2057
+ </div>
2058
+
2059
+ <div id="footer">
2060
+ Generated on Thu Sep 3 15:12:07 2015 by
2061
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2062
+ 0.8.7.6 (ruby-2.0.0).
2063
+ </div>
2064
+
2065
+ </body>
2066
+ </html>