fantasy 0.1.13 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +22 -1
  3. data/.yardopts +4 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +55 -0
  7. data/README.md +14 -6
  8. data/docs/Actor.html +2737 -0
  9. data/docs/Background.html +961 -0
  10. data/docs/Camera.html +791 -0
  11. data/docs/Clock.html +753 -0
  12. data/docs/Color.html +776 -0
  13. data/docs/Coordinates.html +730 -0
  14. data/docs/Cursor.html +752 -0
  15. data/docs/Disk.html +236 -0
  16. data/docs/Draggable.html +198 -0
  17. data/docs/Fantasy.html +121 -0
  18. data/docs/Game.html +904 -0
  19. data/docs/Global.html +2791 -0
  20. data/docs/Gravitier.html +179 -0
  21. data/docs/HudImage.html +979 -0
  22. data/docs/HudText.html +1151 -0
  23. data/docs/Image.html +506 -0
  24. data/docs/Jumper.html +189 -0
  25. data/docs/Mouse.html +226 -0
  26. data/docs/MoveByCursor.html +374 -0
  27. data/docs/MoveByDirection.html +179 -0
  28. data/docs/Mover.html +305 -0
  29. data/docs/Music.html +524 -0
  30. data/docs/Shape.html +1057 -0
  31. data/docs/Sound.html +374 -0
  32. data/docs/Tilemap.html +491 -0
  33. data/docs/Tween.html +186 -0
  34. data/docs/UserInputs.html +879 -0
  35. data/docs/Utils.html +345 -0
  36. data/docs/_index.html +346 -0
  37. data/docs/class_list.html +51 -0
  38. data/docs/css/common.css +1 -0
  39. data/docs/css/full_list.css +58 -0
  40. data/docs/css/style.css +497 -0
  41. data/docs/file.CHANGELOG.html +121 -0
  42. data/docs/file.README.html +599 -0
  43. data/docs/file_list.html +61 -0
  44. data/docs/frames.html +17 -0
  45. data/docs/index.html +599 -0
  46. data/docs/js/app.js +314 -0
  47. data/docs/js/full_list.js +216 -0
  48. data/docs/js/jquery.js +4 -0
  49. data/docs/method_list.html +1931 -0
  50. data/docs/top-level-namespace.html +978 -0
  51. data/lib/fantasy/actor.rb +455 -123
  52. data/lib/fantasy/background.rb +109 -13
  53. data/lib/fantasy/base.rb +113 -1
  54. data/lib/fantasy/camera.rb +95 -11
  55. data/lib/fantasy/clock.rb +4 -2
  56. data/lib/fantasy/color.rb +158 -153
  57. data/lib/fantasy/coordinates.rb +5 -9
  58. data/lib/fantasy/cursor.rb +2 -1
  59. data/lib/fantasy/disk.rb +12 -8
  60. data/lib/fantasy/draggable.rb +22 -1
  61. data/lib/fantasy/global.rb +59 -31
  62. data/lib/fantasy/hud_image.rb +5 -3
  63. data/lib/fantasy/hud_text.rb +6 -2
  64. data/lib/fantasy/image.rb +12 -4
  65. data/lib/fantasy/includes/gravitier.rb +2 -0
  66. data/lib/fantasy/includes/jumper.rb +3 -2
  67. data/lib/fantasy/includes/log.rb +12 -0
  68. data/lib/fantasy/includes/move_by_cursors.rb +24 -15
  69. data/lib/fantasy/includes/move_by_direction.rb +2 -0
  70. data/lib/fantasy/includes/mover.rb +3 -0
  71. data/lib/fantasy/includes/user_inputs.rb +6 -0
  72. data/lib/fantasy/loop.rb +41 -44
  73. data/lib/fantasy/mouse.rb +2 -0
  74. data/lib/fantasy/music.rb +4 -2
  75. data/lib/fantasy/shape.rb +11 -2
  76. data/lib/fantasy/sound.rb +3 -1
  77. data/lib/fantasy/tilemap.rb +19 -13
  78. data/lib/fantasy/tween.rb +3 -1
  79. data/lib/fantasy/utils.rb +7 -13
  80. data/lib/fantasy/version.rb +1 -1
  81. data/lib/fantasy.rb +2 -0
  82. metadata +90 -4
  83. data/fantasy.gemspec +0 -40
  84. data/fonts/VT323-Regular.ttf +0 -0
data/docs/Disk.html ADDED
@@ -0,0 +1,236 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Disk
8
+
9
+ &mdash; Documentation by YARD 0.9.27
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Disk";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (D)</a> &raquo;
40
+
41
+
42
+ <span class="title">Disk</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Disk
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/fantasy/disk.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <h2>
95
+ Class Method Summary
96
+ <small><a href="#" class="summary_toggle">collapse</a></small>
97
+ </h2>
98
+
99
+ <ul class="summary">
100
+
101
+ <li class="public ">
102
+ <span class="summary_signature">
103
+
104
+ <a href="#data-class_method" title="data (class method)">.<strong>data</strong> &#x21d2; Object </a>
105
+
106
+
107
+
108
+ </span>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <span class="summary_desc"><div class='inline'></div></span>
119
+
120
+ </li>
121
+
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#save-class_method" title="save (class method)">.<strong>save</strong> &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+
148
+
149
+
150
+ <div id="class_method_details" class="method_details_list">
151
+ <h2>Class Method Details</h2>
152
+
153
+
154
+ <div class="method_details first">
155
+ <h3 class="signature first" id="data-class_method">
156
+
157
+ .<strong>data</strong> &#x21d2; <tt>Object</tt>
158
+
159
+
160
+
161
+
162
+
163
+ </h3><table class="source_code">
164
+ <tr>
165
+ <td>
166
+ <pre class="lines">
167
+
168
+
169
+ 11
170
+ 12
171
+ 13</pre>
172
+ </td>
173
+ <td>
174
+ <pre class="code"><span class="info file"># File 'lib/fantasy/disk.rb', line 11</span>
175
+
176
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span>
177
+ <span class='cvar'>@@data</span> <span class='op'>||=</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_load'>load</span><span class='rparen'>)</span>
178
+ <span class='kw'>end</span></pre>
179
+ </td>
180
+ </tr>
181
+ </table>
182
+ </div>
183
+
184
+ <div class="method_details ">
185
+ <h3 class="signature " id="save-class_method">
186
+
187
+ .<strong>save</strong> &#x21d2; <tt>Object</tt>
188
+
189
+
190
+
191
+
192
+
193
+ </h3><table class="source_code">
194
+ <tr>
195
+ <td>
196
+ <pre class="lines">
197
+
198
+
199
+ 15
200
+ 16
201
+ 17
202
+ 18
203
+ 19
204
+ 20
205
+ 21
206
+ 22</pre>
207
+ </td>
208
+ <td>
209
+ <pre class="code"><span class="info file"># File 'lib/fantasy/disk.rb', line 15</span>
210
+
211
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span>
212
+ <span class='id identifier rubyid_dirname'>dirname</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='cvar'>@@data_path</span><span class='rparen'>)</span>
213
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_dirname'>dirname</span><span class='rparen'>)</span>
214
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span><span class='lparen'>(</span><span class='id identifier rubyid_dirname'>dirname</span><span class='rparen'>)</span>
215
+ <span class='kw'>end</span>
216
+
217
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='cvar'>@@data_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='cvar'>@@data</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
218
+ <span class='kw'>end</span></pre>
219
+ </td>
220
+ </tr>
221
+ </table>
222
+ </div>
223
+
224
+ </div>
225
+
226
+ </div>
227
+
228
+ <div id="footer">
229
+ Generated on Sat Apr 2 14:24:12 2022 by
230
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
231
+ 0.9.27 (ruby-3.0.2).
232
+ </div>
233
+
234
+ </div>
235
+ </body>
236
+ </html>
@@ -0,0 +1,198 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Draggable
8
+
9
+ &mdash; Documentation by YARD 0.9.27
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Draggable";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (D)</a> &raquo;
40
+
41
+
42
+ <span class="title">Draggable</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Draggable
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+ <dl>
78
+ <dt>Included in:</dt>
79
+ <dd><span class='object_link'><a href="HudImage.html" title="HudImage (class)">HudImage</a></span></dd>
80
+ </dl>
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/fantasy/draggable.rb</dd>
87
+ </dl>
88
+
89
+ </div>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <h2>
100
+ Instance Method Summary
101
+ <small><a href="#" class="summary_toggle">collapse</a></small>
102
+ </h2>
103
+
104
+ <ul class="summary">
105
+
106
+ <li class="public ">
107
+ <span class="summary_signature">
108
+
109
+ <a href="#drag-instance_method" title="#drag (instance method)">#<strong>drag</strong> &#x21d2; Object </a>
110
+
111
+
112
+
113
+ </span>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'><p>rubocop:disable Style/GuardClause.</p>
124
+ </div></span>
125
+
126
+ </li>
127
+
128
+
129
+ </ul>
130
+
131
+
132
+
133
+
134
+ <div id="instance_method_details" class="method_details_list">
135
+ <h2>Instance Method Details</h2>
136
+
137
+
138
+ <div class="method_details first">
139
+ <h3 class="signature first" id="drag-instance_method">
140
+
141
+ #<strong>drag</strong> &#x21d2; <tt>Object</tt>
142
+
143
+
144
+
145
+
146
+
147
+ </h3><div class="docstring">
148
+ <div class="discussion">
149
+ <p>rubocop:disable Style/GuardClause</p>
150
+
151
+
152
+ </div>
153
+ </div>
154
+ <div class="tags">
155
+
156
+
157
+ </div><table class="source_code">
158
+ <tr>
159
+ <td>
160
+ <pre class="lines">
161
+
162
+
163
+ 5
164
+ 6
165
+ 7
166
+ 8
167
+ 9
168
+ 10
169
+ 11</pre>
170
+ </td>
171
+ <td>
172
+ <pre class="code"><span class="info file"># File 'lib/fantasy/draggable.rb', line 5</span>
173
+
174
+ <span class='kw'>def</span> <span class='id identifier rubyid_drag'>drag</span>
175
+ <span class='id identifier rubyid_mouse_position'>mouse_position</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Global.html" title="Global (module)">Global</a></span></span><span class='period'>.</span><span class='id identifier rubyid_mouse_position'><span class='object_link'><a href="Global.html#mouse_position-class_method" title="Global.mouse_position (method)">mouse_position</a></span></span>
176
+
177
+ <span class='id identifier rubyid_start_dragging?'>start_dragging?</span>
178
+ <span class='id identifier rubyid_stop_dragging?'>stop_dragging?</span>
179
+ <span class='id identifier rubyid_drag?'>drag?</span>
180
+ <span class='kw'>end</span></pre>
181
+ </td>
182
+ </tr>
183
+ </table>
184
+ </div>
185
+
186
+ </div>
187
+
188
+ </div>
189
+
190
+ <div id="footer">
191
+ Generated on Sat Apr 2 14:24:12 2022 by
192
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
193
+ 0.9.27 (ruby-3.0.2).
194
+ </div>
195
+
196
+ </div>
197
+ </body>
198
+ </html>
data/docs/Fantasy.html ADDED
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Fantasy
8
+
9
+ &mdash; Documentation by YARD 0.9.27
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Fantasy";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (F)</a> &raquo;
40
+
41
+
42
+ <span class="title">Fantasy</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Fantasy
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/fantasy/version.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+
87
+
88
+ <h2>
89
+ Constant Summary
90
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
91
+ </h2>
92
+
93
+ <dl class="constants">
94
+
95
+ <dt id="VERSION-constant" class="">VERSION =
96
+
97
+ </dt>
98
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.13</span><span class='tstring_end'>&quot;</span></span></pre></dd>
99
+
100
+ </dl>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ </div>
112
+
113
+ <div id="footer">
114
+ Generated on Sat Apr 2 14:24:12 2022 by
115
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
116
+ 0.9.27 (ruby-3.0.2).
117
+ </div>
118
+
119
+ </div>
120
+ </body>
121
+ </html>