motion-game 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/build/android/armeabi/libchipmunk.a +0 -0
- data/build/android/armeabi/libcrypto.a +0 -0
- data/build/android/armeabi/libcurl.a +0 -0
- data/build/android/armeabi/libfreetype.a +0 -0
- data/build/android/armeabi/libjpeg.a +0 -0
- data/build/android/armeabi/libmotion-cocos.a +0 -0
- data/build/android/armeabi/libpng.a +0 -0
- data/build/android/armeabi/libssl.a +0 -0
- data/build/android/armeabi/libtiff.a +0 -0
- data/build/android/armeabi/libwebp.a +0 -0
- data/build/android/armeabi/libwebsockets.a +0 -0
- data/build/android/motion-cocos.jar +0 -0
- data/build/android/x86/libchipmunk.a +0 -0
- data/build/android/x86/libcrypto.a +0 -0
- data/build/android/x86/libcurl.a +0 -0
- data/build/android/x86/libfreetype.a +0 -0
- data/build/android/x86/libjpeg.a +0 -0
- data/build/android/x86/libmotion-cocos.a +0 -0
- data/build/android/x86/libpng.a +0 -0
- data/build/android/x86/libssl.a +0 -0
- data/build/android/x86/libtiff.a +0 -0
- data/build/android/x86/libwebp.a +0 -0
- data/build/android/x86/libwebsockets.a +0 -0
- data/build/ios/libchipmunk.a +0 -0
- data/build/ios/libcurl.a +0 -0
- data/build/ios/libfreetype.a +0 -0
- data/build/ios/libjpeg.a +0 -0
- data/build/ios/libmotion-cocos.a +0 -0
- data/build/ios/libpng.a +0 -0
- data/build/ios/libtiff.a +0 -0
- data/build/ios/libwebp.a +0 -0
- data/build/ios/libwebsockets.a +0 -0
- data/doc/MG.html +129 -0
- data/doc/MG/Application.html +332 -0
- data/doc/MG/Audio.html +1049 -0
- data/doc/MG/Button.html +722 -0
- data/doc/MG/Color.html +528 -0
- data/doc/MG/Director.html +1140 -0
- data/doc/MG/Draw.html +437 -0
- data/doc/MG/Events.html +127 -0
- data/doc/MG/Events/Acceleration.html +502 -0
- data/doc/MG/Events/Touch.html +232 -0
- data/doc/MG/Layout.html +513 -0
- data/doc/MG/List.html +1050 -0
- data/doc/MG/Node.html +1752 -0
- data/doc/MG/Parallax.html +294 -0
- data/doc/MG/Particle.html +1221 -0
- data/doc/MG/Point.html +540 -0
- data/doc/MG/Scene.html +1250 -0
- data/doc/MG/Scroll.html +530 -0
- data/doc/MG/Size.html +737 -0
- data/doc/MG/Slider.html +335 -0
- data/doc/MG/Sprite.html +2066 -0
- data/doc/MG/Text.html +918 -0
- data/doc/MG/Web.html +828 -0
- data/doc/MG/Widget.html +460 -0
- data/doc/_index.html +362 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +114 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +114 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +933 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/motion-game.rb +1 -0
- data/lib/motion-game/android.rb +23 -0
- data/lib/motion-game/android/main_activity.rb +2 -0
- data/lib/motion-game/ios.rb +14 -0
- data/lib/motion-game/ios/app_delegate.rb +20 -0
- data/lib/motion-game/ios/root_view_controller.rb +14 -0
- data/lib/motion-game/project.rb +1 -0
- data/lib/motion-game/shortcuts.rb +177 -0
- data/template/motion-game/files/Gemfile +5 -0
- data/template/motion-game/files/Rakefile +12 -0
- data/template/motion-game/files/app/application.rb +5 -0
- data/template/motion-game/files/app/main_scene.rb +7 -0
- data/template/motion-game/files/config/android.rb.erb +6 -0
- data/template/motion-game/files/config/ios.rb.erb +6 -0
- metadata +130 -0
data/doc/MG/Size.html
ADDED
@@ -0,0 +1,737 @@
|
|
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::Size
|
8
|
+
|
9
|
+
— 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/Size.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> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../MG.html" title="MG (module)">MG</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Size</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::Size
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">MG::Size</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">motion-game</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>A size represents the dimensions of width and height of an object.</p>
|
106
|
+
|
107
|
+
<p>When calling a method that expects a <code>Size</code> object, a 2-element
|
108
|
+
<code>Array</code> can be passed instead, as a convenience shortcut. For
|
109
|
+
example,</p>
|
110
|
+
|
111
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='int'>400</span><span class='rbracket'>]</span></code></pre>
|
112
|
+
|
113
|
+
<p>is the same as</p>
|
114
|
+
|
115
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='const'>MG</span><span class='op'>::</span><span class='const'>Size</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
116
|
+
<span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span> <span class='op'>=</span> <span class='int'>200</span>
|
117
|
+
<span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span> <span class='op'>=</span> <span class='int'>400</span>
|
118
|
+
<span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span></code></pre>
|
119
|
+
|
120
|
+
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
<div class="tags">
|
124
|
+
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<h2>Properties <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
131
|
+
<ul class="summary">
|
132
|
+
|
133
|
+
<li class="public ">
|
134
|
+
<span class="summary_signature">
|
135
|
+
|
136
|
+
<a href="#height-instance_method" title="#height (instance method)">- (Float) <strong>height</strong> </a>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</span>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<span class="summary_desc"><div class='inline'>
|
154
|
+
<p>The size height.</p>
|
155
|
+
</div></span>
|
156
|
+
|
157
|
+
</li>
|
158
|
+
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#width-instance_method" title="#width (instance method)">- (Float) <strong>width</strong> </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<span class="summary_desc"><div class='inline'>
|
181
|
+
<p>The size width.</p>
|
182
|
+
</div></span>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<h2>
|
194
|
+
Helpers
|
195
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
196
|
+
</h2>
|
197
|
+
|
198
|
+
<ul class="summary">
|
199
|
+
|
200
|
+
<li class="public ">
|
201
|
+
<span class="summary_signature">
|
202
|
+
|
203
|
+
<a href="#%2A-instance_method" title="#* (instance method)">- (Size) <strong>*</strong>(delta) </a>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'>
|
218
|
+
<p>Multiplies the dimensions of the receiver with the given number.</p>
|
219
|
+
</div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
<li class="public ">
|
225
|
+
<span class="summary_signature">
|
226
|
+
|
227
|
+
<a href="#%2B-instance_method" title="#+ (instance method)">- (Size) <strong>+</strong>(size) </a>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</span>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
<span class="summary_desc"><div class='inline'>
|
242
|
+
<p>Adds the dimensions of the receiver with the dimensions of the given size
|
243
|
+
object.</p>
|
244
|
+
</div></span>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li class="public ">
|
250
|
+
<span class="summary_signature">
|
251
|
+
|
252
|
+
<a href="#--instance_method" title="#- (instance method)">- (Size) <strong>-</strong>(size) </a>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</span>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
<span class="summary_desc"><div class='inline'>
|
267
|
+
<p>Substracts the dimensions of the receiver with the dimensions of the given
|
268
|
+
size object.</p>
|
269
|
+
</div></span>
|
270
|
+
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
<li class="public ">
|
275
|
+
<span class="summary_signature">
|
276
|
+
|
277
|
+
<a href="#%2F-instance_method" title="#/ (instance method)">- (Size) <strong>/</strong>(delta) </a>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</span>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'>
|
292
|
+
<p>Divides the dimensions of the receiver with the given number.</p>
|
293
|
+
</div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
</ul>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
<div id="instance_attr_details" class="attr_details">
|
303
|
+
<h2>Instance Attribute Details</h2>
|
304
|
+
|
305
|
+
|
306
|
+
<span id="height=-instance_method"></span>
|
307
|
+
<div class="method_details first">
|
308
|
+
<h3 class="signature first" id="height-instance_method">
|
309
|
+
|
310
|
+
- (<tt>Float</tt>) <strong>height</strong>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</h3><div class="docstring">
|
317
|
+
<div class="discussion">
|
318
|
+
|
319
|
+
<p>Returns the size height.</p>
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
</div>
|
324
|
+
<div class="tags">
|
325
|
+
|
326
|
+
<p class="tag_title">Returns:</p>
|
327
|
+
<ul class="return">
|
328
|
+
|
329
|
+
<li>
|
330
|
+
|
331
|
+
|
332
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
—
|
337
|
+
<div class='inline'>
|
338
|
+
<p>the size height.</p>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
</li>
|
342
|
+
|
343
|
+
</ul>
|
344
|
+
|
345
|
+
</div><table class="source_code">
|
346
|
+
<tr>
|
347
|
+
<td>
|
348
|
+
<pre class="lines">
|
349
|
+
|
350
|
+
|
351
|
+
604
|
352
|
+
605
|
353
|
+
606</pre>
|
354
|
+
</td>
|
355
|
+
<td>
|
356
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 604</span>
|
357
|
+
|
358
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_height'>height</span>
|
359
|
+
<span class='ivar'>@height</span>
|
360
|
+
<span class='kw'>end</span></pre>
|
361
|
+
</td>
|
362
|
+
</tr>
|
363
|
+
</table>
|
364
|
+
</div>
|
365
|
+
|
366
|
+
|
367
|
+
<span id="width=-instance_method"></span>
|
368
|
+
<div class="method_details ">
|
369
|
+
<h3 class="signature " id="width-instance_method">
|
370
|
+
|
371
|
+
- (<tt>Float</tt>) <strong>width</strong>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
</h3><div class="docstring">
|
378
|
+
<div class="discussion">
|
379
|
+
|
380
|
+
<p>Returns the size width.</p>
|
381
|
+
|
382
|
+
|
383
|
+
</div>
|
384
|
+
</div>
|
385
|
+
<div class="tags">
|
386
|
+
|
387
|
+
<p class="tag_title">Returns:</p>
|
388
|
+
<ul class="return">
|
389
|
+
|
390
|
+
<li>
|
391
|
+
|
392
|
+
|
393
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
—
|
398
|
+
<div class='inline'>
|
399
|
+
<p>the size width.</p>
|
400
|
+
</div>
|
401
|
+
|
402
|
+
</li>
|
403
|
+
|
404
|
+
</ul>
|
405
|
+
|
406
|
+
</div><table class="source_code">
|
407
|
+
<tr>
|
408
|
+
<td>
|
409
|
+
<pre class="lines">
|
410
|
+
|
411
|
+
|
412
|
+
601
|
413
|
+
602
|
414
|
+
603</pre>
|
415
|
+
</td>
|
416
|
+
<td>
|
417
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 601</span>
|
418
|
+
|
419
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_width'>width</span>
|
420
|
+
<span class='ivar'>@width</span>
|
421
|
+
<span class='kw'>end</span></pre>
|
422
|
+
</td>
|
423
|
+
</tr>
|
424
|
+
</table>
|
425
|
+
</div>
|
426
|
+
|
427
|
+
</div>
|
428
|
+
|
429
|
+
|
430
|
+
<div id="instance_method_details" class="method_details_list">
|
431
|
+
<h2>Instance Method Details</h2>
|
432
|
+
|
433
|
+
|
434
|
+
<div class="method_details first">
|
435
|
+
<h3 class="signature first" id="*-instance_method">
|
436
|
+
|
437
|
+
- (<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>) <strong>*</strong>(delta)
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
</h3><div class="docstring">
|
444
|
+
<div class="discussion">
|
445
|
+
|
446
|
+
<p>Multiplies the dimensions of the receiver with the given number.</p>
|
447
|
+
|
448
|
+
|
449
|
+
</div>
|
450
|
+
</div>
|
451
|
+
<div class="tags">
|
452
|
+
<p class="tag_title">Parameters:</p>
|
453
|
+
<ul class="param">
|
454
|
+
|
455
|
+
<li>
|
456
|
+
|
457
|
+
<span class='name'>delta</span>
|
458
|
+
|
459
|
+
|
460
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
—
|
465
|
+
<div class='inline'>
|
466
|
+
<p>the number to multiply the receiver with.</p>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
</li>
|
470
|
+
|
471
|
+
</ul>
|
472
|
+
|
473
|
+
<p class="tag_title">Returns:</p>
|
474
|
+
<ul class="return">
|
475
|
+
|
476
|
+
<li>
|
477
|
+
|
478
|
+
|
479
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
—
|
484
|
+
<div class='inline'>
|
485
|
+
<p>a new Size object.</p>
|
486
|
+
</div>
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
</ul>
|
491
|
+
|
492
|
+
</div><table class="source_code">
|
493
|
+
<tr>
|
494
|
+
<td>
|
495
|
+
<pre class="lines">
|
496
|
+
|
497
|
+
|
498
|
+
629</pre>
|
499
|
+
</td>
|
500
|
+
<td>
|
501
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 629</span>
|
502
|
+
|
503
|
+
<span class='kw'>def</span> <span class='op'>*</span><span class='lparen'>(</span><span class='id identifier rubyid_delta'>delta</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
504
|
+
</td>
|
505
|
+
</tr>
|
506
|
+
</table>
|
507
|
+
</div>
|
508
|
+
|
509
|
+
<div class="method_details ">
|
510
|
+
<h3 class="signature " id="+-instance_method">
|
511
|
+
|
512
|
+
- (<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>) <strong>+</strong>(size)
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
</h3><div class="docstring">
|
519
|
+
<div class="discussion">
|
520
|
+
|
521
|
+
<p>Adds the dimensions of the receiver with the dimensions of the given size
|
522
|
+
object.</p>
|
523
|
+
|
524
|
+
|
525
|
+
</div>
|
526
|
+
</div>
|
527
|
+
<div class="tags">
|
528
|
+
<p class="tag_title">Parameters:</p>
|
529
|
+
<ul class="param">
|
530
|
+
|
531
|
+
<li>
|
532
|
+
|
533
|
+
<span class='name'>size</span>
|
534
|
+
|
535
|
+
|
536
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
</li>
|
541
|
+
|
542
|
+
</ul>
|
543
|
+
|
544
|
+
<p class="tag_title">Returns:</p>
|
545
|
+
<ul class="return">
|
546
|
+
|
547
|
+
<li>
|
548
|
+
|
549
|
+
|
550
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
—
|
555
|
+
<div class='inline'>
|
556
|
+
<p>a new Size object.</p>
|
557
|
+
</div>
|
558
|
+
|
559
|
+
</li>
|
560
|
+
|
561
|
+
</ul>
|
562
|
+
|
563
|
+
</div><table class="source_code">
|
564
|
+
<tr>
|
565
|
+
<td>
|
566
|
+
<pre class="lines">
|
567
|
+
|
568
|
+
|
569
|
+
613</pre>
|
570
|
+
</td>
|
571
|
+
<td>
|
572
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 613</span>
|
573
|
+
|
574
|
+
<span class='kw'>def</span> <span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
575
|
+
</td>
|
576
|
+
</tr>
|
577
|
+
</table>
|
578
|
+
</div>
|
579
|
+
|
580
|
+
<div class="method_details ">
|
581
|
+
<h3 class="signature " id="--instance_method">
|
582
|
+
|
583
|
+
- (<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>) <strong>-</strong>(size)
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
</h3><div class="docstring">
|
590
|
+
<div class="discussion">
|
591
|
+
|
592
|
+
<p>Substracts the dimensions of the receiver with the dimensions of the given
|
593
|
+
size object.</p>
|
594
|
+
|
595
|
+
|
596
|
+
</div>
|
597
|
+
</div>
|
598
|
+
<div class="tags">
|
599
|
+
<p class="tag_title">Parameters:</p>
|
600
|
+
<ul class="param">
|
601
|
+
|
602
|
+
<li>
|
603
|
+
|
604
|
+
<span class='name'>size</span>
|
605
|
+
|
606
|
+
|
607
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
</li>
|
612
|
+
|
613
|
+
</ul>
|
614
|
+
|
615
|
+
<p class="tag_title">Returns:</p>
|
616
|
+
<ul class="return">
|
617
|
+
|
618
|
+
<li>
|
619
|
+
|
620
|
+
|
621
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
—
|
626
|
+
<div class='inline'>
|
627
|
+
<p>a new Size object.</p>
|
628
|
+
</div>
|
629
|
+
|
630
|
+
</li>
|
631
|
+
|
632
|
+
</ul>
|
633
|
+
|
634
|
+
</div><table class="source_code">
|
635
|
+
<tr>
|
636
|
+
<td>
|
637
|
+
<pre class="lines">
|
638
|
+
|
639
|
+
|
640
|
+
619</pre>
|
641
|
+
</td>
|
642
|
+
<td>
|
643
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 619</span>
|
644
|
+
|
645
|
+
<span class='kw'>def</span> <span class='op'>-</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
646
|
+
</td>
|
647
|
+
</tr>
|
648
|
+
</table>
|
649
|
+
</div>
|
650
|
+
|
651
|
+
<div class="method_details ">
|
652
|
+
<h3 class="signature " id="/-instance_method">
|
653
|
+
|
654
|
+
- (<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>) <strong>/</strong>(delta)
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
</h3><div class="docstring">
|
661
|
+
<div class="discussion">
|
662
|
+
|
663
|
+
<p>Divides the dimensions of the receiver with the given number.</p>
|
664
|
+
|
665
|
+
|
666
|
+
</div>
|
667
|
+
</div>
|
668
|
+
<div class="tags">
|
669
|
+
<p class="tag_title">Parameters:</p>
|
670
|
+
<ul class="param">
|
671
|
+
|
672
|
+
<li>
|
673
|
+
|
674
|
+
<span class='name'>delta</span>
|
675
|
+
|
676
|
+
|
677
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
—
|
682
|
+
<div class='inline'>
|
683
|
+
<p>the number to divide the receiver with.</p>
|
684
|
+
</div>
|
685
|
+
|
686
|
+
</li>
|
687
|
+
|
688
|
+
</ul>
|
689
|
+
|
690
|
+
<p class="tag_title">Returns:</p>
|
691
|
+
<ul class="return">
|
692
|
+
|
693
|
+
<li>
|
694
|
+
|
695
|
+
|
696
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MG::Size (class)">Size</a></span></tt>)</span>
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
—
|
701
|
+
<div class='inline'>
|
702
|
+
<p>a new Size object.</p>
|
703
|
+
</div>
|
704
|
+
|
705
|
+
</li>
|
706
|
+
|
707
|
+
</ul>
|
708
|
+
|
709
|
+
</div><table class="source_code">
|
710
|
+
<tr>
|
711
|
+
<td>
|
712
|
+
<pre class="lines">
|
713
|
+
|
714
|
+
|
715
|
+
624</pre>
|
716
|
+
</td>
|
717
|
+
<td>
|
718
|
+
<pre class="code"><span class="info file"># File 'motion-game', line 624</span>
|
719
|
+
|
720
|
+
<span class='kw'>def</span> <span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_delta'>delta</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
721
|
+
</td>
|
722
|
+
</tr>
|
723
|
+
</table>
|
724
|
+
</div>
|
725
|
+
|
726
|
+
</div>
|
727
|
+
|
728
|
+
</div>
|
729
|
+
|
730
|
+
<div id="footer">
|
731
|
+
Generated on Thu Sep 3 15:12:08 2015 by
|
732
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
733
|
+
0.8.7.6 (ruby-2.0.0).
|
734
|
+
</div>
|
735
|
+
|
736
|
+
</body>
|
737
|
+
</html>
|