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,528 @@
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::Color
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/Color.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 (C)</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">Color</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::Color
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::Color</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 color represents the color, and sometimes opacity (alpha) of an object.</p>
106
+
107
+ <p>When calling a method that expects a <code>Color</code> object, a 3-element
108
+ <code>Array</code> (red-green-blue) or 4-element <code>Array</code>
109
+ (red-green-blue-alpha) can be passed instead, as a convenience shortcut.
110
+ For example,</p>
111
+
112
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='float'>0.2</span><span class='comma'>,</span> <span class='float'>0.3</span><span class='comma'>,</span> <span class='float'>0.4</span><span class='rbracket'>]</span></code></pre>
113
+
114
+ <p>is the same as</p>
115
+
116
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='const'>MG</span><span class='op'>::</span><span class='const'>Color</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
117
+ <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_red'>red</span> <span class='op'>=</span> <span class='float'>0.2</span>
118
+ <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span> <span class='op'>=</span> <span class='float'>0.3</span>
119
+ <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_blue'>blue</span> <span class='op'>=</span> <span class='float'>0.4</span>
120
+ <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='id identifier rubyid_color'>color</span></code></pre>
121
+
122
+ <p>Alternatively, a <code>Symbol</code> corresponding to a basic color name
123
+ can be provided. For example,</p>
124
+
125
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='symbol'>:red</span></code></pre>
126
+
127
+ <p>is the same as</p>
128
+
129
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='const'>MG</span><span class='op'>::</span><span class='const'>Color</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
130
+ <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_red'>red</span> <span class='op'>=</span> <span class='float'>1.0</span>
131
+ <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span> <span class='op'>=</span> <span class='id identifier rubyid_color'>color</span><span class='period'>.</span><span class='id identifier rubyid_blue'>blue</span> <span class='op'>=</span> <span class='int'>0</span>
132
+ <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='id identifier rubyid_color'>color</span></code></pre>
133
+
134
+ <p>Currently, the following symbols are supported: <code>:white</code>,
135
+ <code>:black</code>, <code>:red</code>, <code>:green</code> and
136
+ <code>:blue</code>.</p>
137
+
138
+
139
+ </div>
140
+ </div>
141
+ <div class="tags">
142
+
143
+
144
+ </div>
145
+
146
+
147
+
148
+ <h2>Properties <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
149
+ <ul class="summary">
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#alpha-instance_method" title="#alpha (instance method)">- (Float) <strong>alpha</strong> </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>The alpha portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#blue-instance_method" title="#blue (instance method)">- (Float) <strong>blue</strong> </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <span class="summary_desc"><div class='inline'>
199
+ <p>The blue portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
200
+ </div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#green-instance_method" title="#green (instance method)">- (Float) <strong>green</strong> </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'>
226
+ <p>The green portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#red-instance_method" title="#red (instance method)">- (Float) <strong>red</strong> </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+ <span class="summary_desc"><div class='inline'>
253
+ <p>The red portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
254
+ </div></span>
255
+
256
+ </li>
257
+
258
+
259
+ </ul>
260
+
261
+
262
+
263
+
264
+
265
+ <div id="instance_attr_details" class="attr_details">
266
+ <h2>Instance Attribute Details</h2>
267
+
268
+
269
+ <span id="alpha=-instance_method"></span>
270
+ <div class="method_details first">
271
+ <h3 class="signature first" id="alpha-instance_method">
272
+
273
+ - (<tt>Float</tt>) <strong>alpha</strong>
274
+
275
+
276
+
277
+
278
+
279
+ </h3><div class="docstring">
280
+ <div class="discussion">
281
+
282
+ <p>Returns the alpha portion of the color, from <code>0.0</code> to
283
+ <code>1.0</code>.</p>
284
+
285
+
286
+ </div>
287
+ </div>
288
+ <div class="tags">
289
+
290
+ <p class="tag_title">Returns:</p>
291
+ <ul class="return">
292
+
293
+ <li>
294
+
295
+
296
+ <span class='type'>(<tt>Float</tt>)</span>
297
+
298
+
299
+
300
+ &mdash;
301
+ <div class='inline'>
302
+ <p>the alpha portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
303
+ </div>
304
+
305
+ </li>
306
+
307
+ </ul>
308
+
309
+ </div><table class="source_code">
310
+ <tr>
311
+ <td>
312
+ <pre class="lines">
313
+
314
+
315
+ 668
316
+ 669
317
+ 670</pre>
318
+ </td>
319
+ <td>
320
+ <pre class="code"><span class="info file"># File 'motion-game', line 668</span>
321
+
322
+ <span class='kw'>def</span> <span class='id identifier rubyid_alpha'>alpha</span>
323
+ <span class='ivar'>@alpha</span>
324
+ <span class='kw'>end</span></pre>
325
+ </td>
326
+ </tr>
327
+ </table>
328
+ </div>
329
+
330
+
331
+ <span id="blue=-instance_method"></span>
332
+ <div class="method_details ">
333
+ <h3 class="signature " id="blue-instance_method">
334
+
335
+ - (<tt>Float</tt>) <strong>blue</strong>
336
+
337
+
338
+
339
+
340
+
341
+ </h3><div class="docstring">
342
+ <div class="discussion">
343
+
344
+ <p>Returns the blue portion of the color, from <code>0.0</code> to
345
+ <code>1.0</code>.</p>
346
+
347
+
348
+ </div>
349
+ </div>
350
+ <div class="tags">
351
+
352
+ <p class="tag_title">Returns:</p>
353
+ <ul class="return">
354
+
355
+ <li>
356
+
357
+
358
+ <span class='type'>(<tt>Float</tt>)</span>
359
+
360
+
361
+
362
+ &mdash;
363
+ <div class='inline'>
364
+ <p>the blue portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
365
+ </div>
366
+
367
+ </li>
368
+
369
+ </ul>
370
+
371
+ </div><table class="source_code">
372
+ <tr>
373
+ <td>
374
+ <pre class="lines">
375
+
376
+
377
+ 665
378
+ 666
379
+ 667</pre>
380
+ </td>
381
+ <td>
382
+ <pre class="code"><span class="info file"># File 'motion-game', line 665</span>
383
+
384
+ <span class='kw'>def</span> <span class='id identifier rubyid_blue'>blue</span>
385
+ <span class='ivar'>@blue</span>
386
+ <span class='kw'>end</span></pre>
387
+ </td>
388
+ </tr>
389
+ </table>
390
+ </div>
391
+
392
+
393
+ <span id="green=-instance_method"></span>
394
+ <div class="method_details ">
395
+ <h3 class="signature " id="green-instance_method">
396
+
397
+ - (<tt>Float</tt>) <strong>green</strong>
398
+
399
+
400
+
401
+
402
+
403
+ </h3><div class="docstring">
404
+ <div class="discussion">
405
+
406
+ <p>Returns the green portion of the color, from <code>0.0</code> to
407
+ <code>1.0</code>.</p>
408
+
409
+
410
+ </div>
411
+ </div>
412
+ <div class="tags">
413
+
414
+ <p class="tag_title">Returns:</p>
415
+ <ul class="return">
416
+
417
+ <li>
418
+
419
+
420
+ <span class='type'>(<tt>Float</tt>)</span>
421
+
422
+
423
+
424
+ &mdash;
425
+ <div class='inline'>
426
+ <p>the green portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
427
+ </div>
428
+
429
+ </li>
430
+
431
+ </ul>
432
+
433
+ </div><table class="source_code">
434
+ <tr>
435
+ <td>
436
+ <pre class="lines">
437
+
438
+
439
+ 662
440
+ 663
441
+ 664</pre>
442
+ </td>
443
+ <td>
444
+ <pre class="code"><span class="info file"># File 'motion-game', line 662</span>
445
+
446
+ <span class='kw'>def</span> <span class='id identifier rubyid_green'>green</span>
447
+ <span class='ivar'>@green</span>
448
+ <span class='kw'>end</span></pre>
449
+ </td>
450
+ </tr>
451
+ </table>
452
+ </div>
453
+
454
+
455
+ <span id="red=-instance_method"></span>
456
+ <div class="method_details ">
457
+ <h3 class="signature " id="red-instance_method">
458
+
459
+ - (<tt>Float</tt>) <strong>red</strong>
460
+
461
+
462
+
463
+
464
+
465
+ </h3><div class="docstring">
466
+ <div class="discussion">
467
+
468
+ <p>Returns the red portion of the color, from <code>0.0</code> to
469
+ <code>1.0</code>.</p>
470
+
471
+
472
+ </div>
473
+ </div>
474
+ <div class="tags">
475
+
476
+ <p class="tag_title">Returns:</p>
477
+ <ul class="return">
478
+
479
+ <li>
480
+
481
+
482
+ <span class='type'>(<tt>Float</tt>)</span>
483
+
484
+
485
+
486
+ &mdash;
487
+ <div class='inline'>
488
+ <p>the red portion of the color, from <code>0.0</code> to <code>1.0</code>.</p>
489
+ </div>
490
+
491
+ </li>
492
+
493
+ </ul>
494
+
495
+ </div><table class="source_code">
496
+ <tr>
497
+ <td>
498
+ <pre class="lines">
499
+
500
+
501
+ 659
502
+ 660
503
+ 661</pre>
504
+ </td>
505
+ <td>
506
+ <pre class="code"><span class="info file"># File 'motion-game', line 659</span>
507
+
508
+ <span class='kw'>def</span> <span class='id identifier rubyid_red'>red</span>
509
+ <span class='ivar'>@red</span>
510
+ <span class='kw'>end</span></pre>
511
+ </td>
512
+ </tr>
513
+ </table>
514
+ </div>
515
+
516
+ </div>
517
+
518
+
519
+ </div>
520
+
521
+ <div id="footer">
522
+ Generated on Thu Sep 3 15:12:08 2015 by
523
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
524
+ 0.8.7.6 (ruby-2.0.0).
525
+ </div>
526
+
527
+ </body>
528
+ </html>