fantasy 0.1.13 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -1
- data/.yardopts +4 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +55 -0
- data/README.md +14 -6
- data/docs/Actor.html +2737 -0
- data/docs/Background.html +961 -0
- data/docs/Camera.html +791 -0
- data/docs/Clock.html +753 -0
- data/docs/Color.html +776 -0
- data/docs/Coordinates.html +730 -0
- data/docs/Cursor.html +752 -0
- data/docs/Disk.html +236 -0
- data/docs/Draggable.html +198 -0
- data/docs/Fantasy.html +121 -0
- data/docs/Game.html +904 -0
- data/docs/Global.html +2791 -0
- data/docs/Gravitier.html +179 -0
- data/docs/HudImage.html +979 -0
- data/docs/HudText.html +1151 -0
- data/docs/Image.html +506 -0
- data/docs/Jumper.html +189 -0
- data/docs/Mouse.html +226 -0
- data/docs/MoveByCursor.html +374 -0
- data/docs/MoveByDirection.html +179 -0
- data/docs/Mover.html +305 -0
- data/docs/Music.html +524 -0
- data/docs/Shape.html +1057 -0
- data/docs/Sound.html +374 -0
- data/docs/Tilemap.html +491 -0
- data/docs/Tween.html +186 -0
- data/docs/UserInputs.html +879 -0
- data/docs/Utils.html +345 -0
- data/docs/_index.html +346 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.CHANGELOG.html +121 -0
- data/docs/file.README.html +599 -0
- data/docs/file_list.html +61 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +599 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +1931 -0
- data/docs/top-level-namespace.html +978 -0
- data/lib/fantasy/actor.rb +455 -123
- data/lib/fantasy/background.rb +109 -13
- data/lib/fantasy/base.rb +113 -1
- data/lib/fantasy/camera.rb +95 -11
- data/lib/fantasy/clock.rb +4 -2
- data/lib/fantasy/color.rb +158 -153
- data/lib/fantasy/coordinates.rb +5 -9
- data/lib/fantasy/cursor.rb +2 -1
- data/lib/fantasy/disk.rb +12 -8
- data/lib/fantasy/draggable.rb +22 -1
- data/lib/fantasy/global.rb +59 -31
- data/lib/fantasy/hud_image.rb +5 -3
- data/lib/fantasy/hud_text.rb +6 -2
- data/lib/fantasy/image.rb +12 -4
- data/lib/fantasy/includes/gravitier.rb +2 -0
- data/lib/fantasy/includes/jumper.rb +3 -2
- data/lib/fantasy/includes/log.rb +12 -0
- data/lib/fantasy/includes/move_by_cursors.rb +24 -15
- data/lib/fantasy/includes/move_by_direction.rb +2 -0
- data/lib/fantasy/includes/mover.rb +3 -0
- data/lib/fantasy/includes/user_inputs.rb +6 -0
- data/lib/fantasy/loop.rb +41 -44
- data/lib/fantasy/mouse.rb +2 -0
- data/lib/fantasy/music.rb +4 -2
- data/lib/fantasy/shape.rb +11 -2
- data/lib/fantasy/sound.rb +3 -1
- data/lib/fantasy/tilemap.rb +19 -13
- data/lib/fantasy/tween.rb +3 -1
- data/lib/fantasy/utils.rb +7 -13
- data/lib/fantasy/version.rb +1 -1
- data/lib/fantasy.rb +2 -0
- metadata +90 -4
- data/fantasy.gemspec +0 -40
- data/fonts/VT323-Regular.ttf +0 -0
data/docs/Mouse.html
ADDED
@@ -0,0 +1,226 @@
|
|
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: Mouse
|
8
|
+
|
9
|
+
— 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 = "Mouse";
|
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 (M)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Mouse</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: Mouse
|
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/mouse.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="#left-class_method" title="left (class method)">.<strong>left</strong> ⇒ 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="#right-class_method" title="right (class method)">.<strong>right</strong> ⇒ 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="left-class_method">
|
156
|
+
|
157
|
+
.<strong>left</strong> ⇒ <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
|
+
4
|
170
|
+
5
|
171
|
+
6</pre>
|
172
|
+
</td>
|
173
|
+
<td>
|
174
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/mouse.rb', line 4</span>
|
175
|
+
|
176
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_left'>left</span>
|
177
|
+
<span class='const'>Gosu</span><span class='op'>::</span><span class='const'>MS_LEFT</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="right-class_method">
|
186
|
+
|
187
|
+
.<strong>right</strong> ⇒ <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
|
+
8
|
200
|
+
9
|
201
|
+
10</pre>
|
202
|
+
</td>
|
203
|
+
<td>
|
204
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/mouse.rb', line 8</span>
|
205
|
+
|
206
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_right'>right</span>
|
207
|
+
<span class='const'>Gosu</span><span class='op'>::</span><span class='const'>MS_RIGHT</span>
|
208
|
+
<span class='kw'>end</span></pre>
|
209
|
+
</td>
|
210
|
+
</tr>
|
211
|
+
</table>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
</div>
|
217
|
+
|
218
|
+
<div id="footer">
|
219
|
+
Generated on Sat Apr 2 14:24:12 2022 by
|
220
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
221
|
+
0.9.27 (ruby-3.0.2).
|
222
|
+
</div>
|
223
|
+
|
224
|
+
</div>
|
225
|
+
</body>
|
226
|
+
</html>
|
@@ -0,0 +1,374 @@
|
|
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: MoveByCursor
|
8
|
+
|
9
|
+
— 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 = "MoveByCursor";
|
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 (M)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">MoveByCursor</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: MoveByCursor
|
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="Actor.html" title="Actor (class)">Actor</a></span></dd>
|
80
|
+
</dl>
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<dl>
|
85
|
+
<dt>Defined in:</dt>
|
86
|
+
<dd>lib/fantasy/includes/move_by_cursors.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="#move_by-instance_method" title="#move_by (instance method)">#<strong>move_by</strong>(direction) ⇒ 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:enable Metrics/PerceivedComplexity.</p>
|
124
|
+
</div></span>
|
125
|
+
|
126
|
+
</li>
|
127
|
+
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#move_by_cursors-instance_method" title="#move_by_cursors (instance method)">#<strong>move_by_cursors</strong> ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'><p>rubocop:disable.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#move_with_cursors-instance_method" title="#move_with_cursors (instance method)">#<strong>move_with_cursors</strong>(down: nil, up: nil, left: nil, right: nil, jump: false) ⇒ Object </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'><p>rubocop:disable Metrics/PerceivedComplexity.</p>
|
170
|
+
</div></span>
|
171
|
+
|
172
|
+
</li>
|
173
|
+
|
174
|
+
|
175
|
+
</ul>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<div id="instance_method_details" class="method_details_list">
|
181
|
+
<h2>Instance Method Details</h2>
|
182
|
+
|
183
|
+
|
184
|
+
<div class="method_details first">
|
185
|
+
<h3 class="signature first" id="move_by-instance_method">
|
186
|
+
|
187
|
+
#<strong>move_by</strong>(direction) ⇒ <tt>Object</tt>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</h3><div class="docstring">
|
194
|
+
<div class="discussion">
|
195
|
+
<p>rubocop:enable Metrics/PerceivedComplexity</p>
|
196
|
+
|
197
|
+
|
198
|
+
</div>
|
199
|
+
</div>
|
200
|
+
<div class="tags">
|
201
|
+
|
202
|
+
|
203
|
+
</div><table class="source_code">
|
204
|
+
<tr>
|
205
|
+
<td>
|
206
|
+
<pre class="lines">
|
207
|
+
|
208
|
+
|
209
|
+
45
|
210
|
+
46
|
211
|
+
47</pre>
|
212
|
+
</td>
|
213
|
+
<td>
|
214
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/includes/move_by_cursors.rb', line 45</span>
|
215
|
+
|
216
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='id identifier rubyid_direction'>direction</span><span class='rparen'>)</span>
|
217
|
+
<span class='ivar'>@position</span> <span class='op'>+=</span> <span class='id identifier rubyid_direction'>direction</span> <span class='op'>*</span> <span class='ivar'>@speed</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_frame_time'><span class='object_link'><a href="Global.html#frame_time-class_method" title="Global.frame_time (method)">frame_time</a></span></span>
|
218
|
+
<span class='kw'>end</span></pre>
|
219
|
+
</td>
|
220
|
+
</tr>
|
221
|
+
</table>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method_details ">
|
225
|
+
<h3 class="signature " id="move_by_cursors-instance_method">
|
226
|
+
|
227
|
+
#<strong>move_by_cursors</strong> ⇒ <tt>Object</tt>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</h3><div class="docstring">
|
234
|
+
<div class="discussion">
|
235
|
+
<p>rubocop:disable</p>
|
236
|
+
|
237
|
+
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
<div class="tags">
|
241
|
+
|
242
|
+
|
243
|
+
</div><table class="source_code">
|
244
|
+
<tr>
|
245
|
+
<td>
|
246
|
+
<pre class="lines">
|
247
|
+
|
248
|
+
|
249
|
+
5
|
250
|
+
6
|
251
|
+
7
|
252
|
+
8
|
253
|
+
9
|
254
|
+
10
|
255
|
+
11
|
256
|
+
12
|
257
|
+
13
|
258
|
+
14
|
259
|
+
15
|
260
|
+
16
|
261
|
+
17
|
262
|
+
18
|
263
|
+
19
|
264
|
+
20
|
265
|
+
21
|
266
|
+
22
|
267
|
+
23
|
268
|
+
24
|
269
|
+
25</pre>
|
270
|
+
</td>
|
271
|
+
<td>
|
272
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/includes/move_by_cursors.rb', line 5</span>
|
273
|
+
|
274
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_move_by_cursors'>move_by_cursors</span>
|
275
|
+
<span class='kw'>if</span> <span class='const'>Gosu</span><span class='period'>.</span><span class='id identifier rubyid_button_down?'>button_down?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Cursor.html" title="Cursor (module)">Cursor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_down'><span class='object_link'><a href="Cursor.html#down-class_method" title="Cursor.down (method)">down</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@move_with_cursors_down</span>
|
276
|
+
<span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Coordinates.html" title="Coordinates (class)">Coordinates</a></span></span><span class='period'>.</span><span class='id identifier rubyid_down'><span class='object_link'><a href="Coordinates.html#down-class_method" title="Coordinates.down (method)">down</a></span></span><span class='rparen'>)</span>
|
277
|
+
<span class='kw'>end</span>
|
278
|
+
|
279
|
+
<span class='kw'>if</span> <span class='const'>Gosu</span><span class='period'>.</span><span class='id identifier rubyid_button_down?'>button_down?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Cursor.html" title="Cursor (module)">Cursor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_up'><span class='object_link'><a href="Cursor.html#up-class_method" title="Cursor.up (method)">up</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@move_with_cursors_up</span>
|
280
|
+
<span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Coordinates.html" title="Coordinates (class)">Coordinates</a></span></span><span class='period'>.</span><span class='id identifier rubyid_up'><span class='object_link'><a href="Coordinates.html#up-class_method" title="Coordinates.up (method)">up</a></span></span><span class='rparen'>)</span>
|
281
|
+
<span class='kw'>end</span>
|
282
|
+
|
283
|
+
<span class='kw'>if</span> <span class='const'>Gosu</span><span class='period'>.</span><span class='id identifier rubyid_button_down?'>button_down?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Cursor.html" title="Cursor (module)">Cursor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_right'><span class='object_link'><a href="Cursor.html#right-class_method" title="Cursor.right (method)">right</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@move_with_cursors_right</span>
|
284
|
+
<span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Coordinates.html" title="Coordinates (class)">Coordinates</a></span></span><span class='period'>.</span><span class='id identifier rubyid_right'><span class='object_link'><a href="Coordinates.html#right-class_method" title="Coordinates.right (method)">right</a></span></span><span class='rparen'>)</span>
|
285
|
+
<span class='kw'>end</span>
|
286
|
+
|
287
|
+
<span class='kw'>if</span> <span class='const'>Gosu</span><span class='period'>.</span><span class='id identifier rubyid_button_down?'>button_down?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Cursor.html" title="Cursor (module)">Cursor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_left'><span class='object_link'><a href="Cursor.html#left-class_method" title="Cursor.left (method)">left</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@move_with_cursors_left</span>
|
288
|
+
<span class='id identifier rubyid_move_by'>move_by</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Coordinates.html" title="Coordinates (class)">Coordinates</a></span></span><span class='period'>.</span><span class='id identifier rubyid_left'><span class='object_link'><a href="Coordinates.html#left-class_method" title="Coordinates.left (method)">left</a></span></span><span class='rparen'>)</span>
|
289
|
+
<span class='kw'>end</span>
|
290
|
+
|
291
|
+
<span class='kw'>if</span> <span class='const'>Gosu</span><span class='period'>.</span><span class='id identifier rubyid_button_down?'>button_down?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Cursor.html" title="Cursor (module)">Cursor</a></span></span><span class='period'>.</span><span class='id identifier rubyid_space_bar'><span class='object_link'><a href="Cursor.html#space_bar-class_method" title="Cursor.space_bar (method)">space_bar</a></span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='ivar'>@jumping</span> <span class='op'>&&</span> <span class='ivar'>@on_floor</span> <span class='op'>&&</span> <span class='ivar'>@move_with_cursors_jump</span>
|
292
|
+
<span class='id identifier rubyid_jump'>jump</span>
|
293
|
+
<span class='kw'>end</span>
|
294
|
+
<span class='kw'>end</span></pre>
|
295
|
+
</td>
|
296
|
+
</tr>
|
297
|
+
</table>
|
298
|
+
</div>
|
299
|
+
|
300
|
+
<div class="method_details ">
|
301
|
+
<h3 class="signature " id="move_with_cursors-instance_method">
|
302
|
+
|
303
|
+
#<strong>move_with_cursors</strong>(down: nil, up: nil, left: nil, right: nil, jump: false) ⇒ <tt>Object</tt>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
</h3><div class="docstring">
|
310
|
+
<div class="discussion">
|
311
|
+
<p>rubocop:disable Metrics/PerceivedComplexity</p>
|
312
|
+
|
313
|
+
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
<div class="tags">
|
317
|
+
|
318
|
+
|
319
|
+
</div><table class="source_code">
|
320
|
+
<tr>
|
321
|
+
<td>
|
322
|
+
<pre class="lines">
|
323
|
+
|
324
|
+
|
325
|
+
29
|
326
|
+
30
|
327
|
+
31
|
328
|
+
32
|
329
|
+
33
|
330
|
+
34
|
331
|
+
35
|
332
|
+
36
|
333
|
+
37
|
334
|
+
38
|
335
|
+
39
|
336
|
+
40
|
337
|
+
41
|
338
|
+
42</pre>
|
339
|
+
</td>
|
340
|
+
<td>
|
341
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/includes/move_by_cursors.rb', line 29</span>
|
342
|
+
|
343
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_move_with_cursors'>move_with_cursors</span><span class='lparen'>(</span><span class='label'>down:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>up:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>left:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>right:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>jump:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
344
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_down'>down</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_up'>up</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_left'>left</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_right'>right</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
345
|
+
<span class='id identifier rubyid_down'>down</span> <span class='op'>=</span> <span class='kw'>true</span>
|
346
|
+
<span class='id identifier rubyid_up'>up</span> <span class='op'>=</span> <span class='kw'>true</span>
|
347
|
+
<span class='id identifier rubyid_left'>left</span> <span class='op'>=</span> <span class='kw'>true</span>
|
348
|
+
<span class='id identifier rubyid_right'>right</span> <span class='op'>=</span> <span class='kw'>true</span>
|
349
|
+
<span class='kw'>end</span>
|
350
|
+
|
351
|
+
<span class='ivar'>@move_with_cursors_down</span> <span class='op'>=</span> <span class='id identifier rubyid_down'>down</span> <span class='op'>||</span> <span class='kw'>false</span>
|
352
|
+
<span class='ivar'>@move_with_cursors_up</span> <span class='op'>=</span> <span class='id identifier rubyid_up'>up</span> <span class='op'>||</span> <span class='kw'>false</span>
|
353
|
+
<span class='ivar'>@move_with_cursors_left</span> <span class='op'>=</span> <span class='id identifier rubyid_left'>left</span> <span class='op'>||</span> <span class='kw'>false</span>
|
354
|
+
<span class='ivar'>@move_with_cursors_right</span> <span class='op'>=</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>||</span> <span class='kw'>false</span>
|
355
|
+
<span class='ivar'>@move_with_cursors_jump</span> <span class='op'>=</span> <span class='id identifier rubyid_jump'>jump</span> <span class='op'>||</span> <span class='kw'>false</span>
|
356
|
+
<span class='kw'>end</span></pre>
|
357
|
+
</td>
|
358
|
+
</tr>
|
359
|
+
</table>
|
360
|
+
</div>
|
361
|
+
|
362
|
+
</div>
|
363
|
+
|
364
|
+
</div>
|
365
|
+
|
366
|
+
<div id="footer">
|
367
|
+
Generated on Sat Apr 2 14:24:12 2022 by
|
368
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
369
|
+
0.9.27 (ruby-3.0.2).
|
370
|
+
</div>
|
371
|
+
|
372
|
+
</div>
|
373
|
+
</body>
|
374
|
+
</html>
|