zyps 0.4.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/zyps +32 -80
- data/lib/zyps/actions.rb +74 -2
- data/lib/zyps/environmental_factors.rb +16 -0
- data/lib/zyps.rb +90 -17
- data/test/test_zyps.rb +111 -8
- data/test/zyps/test_actions.rb +111 -46
- data/test/zyps/test_behaviors.rb +0 -0
- data/test/zyps/test_environmental_factors.rb +33 -0
- metadata +3 -134
- data/doc/classes/AccelerateAction.html +0 -182
- data/doc/classes/AccelerateAction.src/M000009.html +0 -19
- data/doc/classes/AccelerateAction.src/M000010.html +0 -18
- data/doc/classes/Action.html +0 -118
- data/doc/classes/AgeCondition.html +0 -181
- data/doc/classes/AgeCondition.src/M000039.html +0 -18
- data/doc/classes/AgeCondition.src/M000040.html +0 -18
- data/doc/classes/ApproachAction.html +0 -189
- data/doc/classes/ApproachAction.src/M000048.html +0 -19
- data/doc/classes/ApproachAction.src/M000049.html +0 -38
- data/doc/classes/Behavior.html +0 -202
- data/doc/classes/Behavior.src/M000001.html +0 -18
- data/doc/classes/Behavior.src/M000002.html +0 -19
- data/doc/classes/BlendAction.html +0 -181
- data/doc/classes/BlendAction.src/M000043.html +0 -18
- data/doc/classes/BlendAction.src/M000044.html +0 -18
- data/doc/classes/Clock.html +0 -165
- data/doc/classes/Clock.src/M000041.html +0 -18
- data/doc/classes/Clock.src/M000042.html +0 -21
- data/doc/classes/CollisionCondition.html +0 -148
- data/doc/classes/CollisionCondition.src/M000053.html +0 -18
- data/doc/classes/Color.html +0 -299
- data/doc/classes/Color.src/M000022.html +0 -18
- data/doc/classes/Color.src/M000023.html +0 -16
- data/doc/classes/Color.src/M000024.html +0 -16
- data/doc/classes/Color.src/M000025.html +0 -16
- data/doc/classes/Color.src/M000026.html +0 -18
- data/doc/classes/Color.src/M000027.html +0 -22
- data/doc/classes/Condition.html +0 -118
- data/doc/classes/Creature.html +0 -191
- data/doc/classes/Creature.src/M000011.html +0 -19
- data/doc/classes/Creature.src/M000012.html +0 -18
- data/doc/classes/DestroyAction.html +0 -181
- data/doc/classes/DestroyAction.src/M000030.html +0 -18
- data/doc/classes/DestroyAction.src/M000031.html +0 -18
- data/doc/classes/EatAction.html +0 -149
- data/doc/classes/EatAction.src/M000045.html +0 -21
- data/doc/classes/Enclosure.html +0 -206
- data/doc/classes/Enclosure.src/M000005.html +0 -18
- data/doc/classes/Enclosure.src/M000006.html +0 -31
- data/doc/classes/Environment.html +0 -203
- data/doc/classes/Environment.src/M000046.html +0 -19
- data/doc/classes/Environment.src/M000047.html +0 -45
- data/doc/classes/EnvironmentalFactor.html +0 -118
- data/doc/classes/FaceAction.html +0 -148
- data/doc/classes/FaceAction.src/M000052.html +0 -18
- data/doc/classes/FleeAction.html +0 -189
- data/doc/classes/FleeAction.src/M000054.html +0 -19
- data/doc/classes/FleeAction.src/M000055.html +0 -38
- data/doc/classes/GameObject.html +0 -282
- data/doc/classes/GameObject.src/M000032.html +0 -19
- data/doc/classes/GameObject.src/M000033.html +0 -16
- data/doc/classes/GameObject.src/M000034.html +0 -19
- data/doc/classes/GameObject.src/M000035.html +0 -16
- data/doc/classes/GameObject.src/M000036.html +0 -16
- data/doc/classes/Location.html +0 -167
- data/doc/classes/Location.src/M000021.html +0 -18
- data/doc/classes/ProximityCondition.html +0 -182
- data/doc/classes/ProximityCondition.src/M000037.html +0 -18
- data/doc/classes/ProximityCondition.src/M000038.html +0 -18
- data/doc/classes/TagAction.html +0 -181
- data/doc/classes/TagAction.src/M000028.html +0 -18
- data/doc/classes/TagAction.src/M000029.html +0 -18
- data/doc/classes/TagCondition.html +0 -181
- data/doc/classes/TagCondition.src/M000007.html +0 -18
- data/doc/classes/TagCondition.src/M000008.html +0 -18
- data/doc/classes/TrailsView.html +0 -209
- data/doc/classes/TrailsView.src/M000003.html +0 -40
- data/doc/classes/TrailsView.src/M000004.html +0 -78
- data/doc/classes/TurnAction.html +0 -182
- data/doc/classes/TurnAction.src/M000050.html +0 -19
- data/doc/classes/TurnAction.src/M000051.html +0 -18
- data/doc/classes/Utility.html +0 -264
- data/doc/classes/Utility.src/M000056.html +0 -26
- data/doc/classes/Utility.src/M000057.html +0 -22
- data/doc/classes/Utility.src/M000058.html +0 -18
- data/doc/classes/Utility.src/M000059.html +0 -21
- data/doc/classes/Utility.src/M000060.html +0 -25
- data/doc/classes/Utility.src/M000061.html +0 -21
- data/doc/classes/Utility.src/M000062.html +0 -21
- data/doc/classes/Vector.html +0 -281
- data/doc/classes/Vector.src/M000013.html +0 -19
- data/doc/classes/Vector.src/M000014.html +0 -16
- data/doc/classes/Vector.src/M000015.html +0 -21
- data/doc/classes/Vector.src/M000016.html +0 -16
- data/doc/classes/Vector.src/M000017.html +0 -18
- data/doc/classes/Vector.src/M000018.html +0 -16
- data/doc/classes/Vector.src/M000019.html +0 -18
- data/doc/classes/Vector.src/M000020.html +0 -25
- data/doc/created.rid +0 -1
- data/doc/files/COPYING_LESSER_txt.html +0 -311
- data/doc/files/COPYING_txt.html +0 -1003
- data/doc/files/README_txt.html +0 -214
- data/doc/files/lib/zyps/actions_rb.html +0 -134
- data/doc/files/lib/zyps/conditions_rb.html +0 -134
- data/doc/files/lib/zyps/environmental_factors_rb.html +0 -134
- data/doc/files/lib/zyps/views/trails_rb.html +0 -134
- data/doc/files/lib/zyps_rb.html +0 -134
- data/doc/fr_class_index.html +0 -53
- data/doc/fr_file_index.html +0 -34
- data/doc/fr_method_index.html +0 -88
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
data/doc/classes/GameObject.html
DELETED
@@ -1,282 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: GameObject</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">GameObject</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/zyps_rb.html">
|
59
|
-
lib/zyps.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<p>
|
83
|
-
An object in the virtual environment.
|
84
|
-
</p>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="method-list">
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
93
|
-
|
94
|
-
<div class="name-list">
|
95
|
-
<a href="#M000035">age</a>
|
96
|
-
<a href="#M000036">age=</a>
|
97
|
-
<a href="#M000034">move</a>
|
98
|
-
<a href="#M000032">new</a>
|
99
|
-
<a href="#M000033">size=</a>
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
|
106
|
-
<!-- if includes -->
|
107
|
-
|
108
|
-
<div id="section">
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
<div id="attribute-list">
|
115
|
-
<h3 class="section-bar">Attributes</h3>
|
116
|
-
|
117
|
-
<div class="name-list">
|
118
|
-
<table>
|
119
|
-
<tr class="top-aligned-row context-row">
|
120
|
-
<td class="context-item-name">color</td>
|
121
|
-
<td class="context-item-value"> [RW] </td>
|
122
|
-
<td class="context-item-desc">
|
123
|
-
A <a href="Color.html">Color</a> that will be used to draw the object.
|
124
|
-
|
125
|
-
</td>
|
126
|
-
</tr>
|
127
|
-
<tr class="top-aligned-row context-row">
|
128
|
-
<td class="context-item-name">identifier</td>
|
129
|
-
<td class="context-item-value"> [R] </td>
|
130
|
-
<td class="context-item-desc">
|
131
|
-
A universal identifier for the object. Needed for DRb transmission, etc.
|
132
|
-
|
133
|
-
</td>
|
134
|
-
</tr>
|
135
|
-
<tr class="top-aligned-row context-row">
|
136
|
-
<td class="context-item-name">location</td>
|
137
|
-
<td class="context-item-value"> [RW] </td>
|
138
|
-
<td class="context-item-desc">
|
139
|
-
The object‘s <a href="Location.html">Location</a> in space.
|
140
|
-
|
141
|
-
</td>
|
142
|
-
</tr>
|
143
|
-
<tr class="top-aligned-row context-row">
|
144
|
-
<td class="context-item-name">name</td>
|
145
|
-
<td class="context-item-value"> [RW] </td>
|
146
|
-
<td class="context-item-desc">
|
147
|
-
A String with the object‘s name.
|
148
|
-
|
149
|
-
</td>
|
150
|
-
</tr>
|
151
|
-
<tr class="top-aligned-row context-row">
|
152
|
-
<td class="context-item-name">size</td>
|
153
|
-
<td class="context-item-value"> [RW] </td>
|
154
|
-
<td class="context-item-desc">
|
155
|
-
Radius of the object.
|
156
|
-
|
157
|
-
</td>
|
158
|
-
</tr>
|
159
|
-
<tr class="top-aligned-row context-row">
|
160
|
-
<td class="context-item-name">tags</td>
|
161
|
-
<td class="context-item-value"> [RW] </td>
|
162
|
-
<td class="context-item-desc">
|
163
|
-
An array of Strings with tags that determine how the object will be treated
|
164
|
-
by <a href="Creature.html">Creature</a> and <a
|
165
|
-
href="EnvironmentalFactor.html">EnvironmentalFactor</a> objects in its
|
166
|
-
environment.
|
167
|
-
|
168
|
-
</td>
|
169
|
-
</tr>
|
170
|
-
<tr class="top-aligned-row context-row">
|
171
|
-
<td class="context-item-name">vector</td>
|
172
|
-
<td class="context-item-value"> [RW] </td>
|
173
|
-
<td class="context-item-desc">
|
174
|
-
A <a href="Vector.html">Vector</a> with the object‘s current speed
|
175
|
-
and direction of travel.
|
176
|
-
|
177
|
-
</td>
|
178
|
-
</tr>
|
179
|
-
</table>
|
180
|
-
</div>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
<!-- if method_list -->
|
186
|
-
<div id="methods">
|
187
|
-
<h3 class="section-bar">Public Class methods</h3>
|
188
|
-
|
189
|
-
<div id="method-M000032" class="method-detail">
|
190
|
-
<a name="M000032"></a>
|
191
|
-
|
192
|
-
<div class="method-heading">
|
193
|
-
<a href="GameObject.src/M000032.html" target="Code" class="method-signature"
|
194
|
-
onclick="popupCode('GameObject.src/M000032.html');return false;">
|
195
|
-
<span class="method-name">new</span><span class="method-args">(name = nil, location = Location.new, color = Color.new, vector = Vector.new, age = 0, size = 1, tags = [])</span>
|
196
|
-
</a>
|
197
|
-
</div>
|
198
|
-
|
199
|
-
<div class="method-description">
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
204
|
-
|
205
|
-
<div id="method-M000035" class="method-detail">
|
206
|
-
<a name="M000035"></a>
|
207
|
-
|
208
|
-
<div class="method-heading">
|
209
|
-
<a href="GameObject.src/M000035.html" target="Code" class="method-signature"
|
210
|
-
onclick="popupCode('GameObject.src/M000035.html');return false;">
|
211
|
-
<span class="method-name">age</span><span class="method-args">()</span>
|
212
|
-
</a>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
<p>
|
217
|
-
Time since the object was created, in seconds.
|
218
|
-
</p>
|
219
|
-
</div>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div id="method-M000036" class="method-detail">
|
223
|
-
<a name="M000036"></a>
|
224
|
-
|
225
|
-
<div class="method-heading">
|
226
|
-
<a href="GameObject.src/M000036.html" target="Code" class="method-signature"
|
227
|
-
onclick="popupCode('GameObject.src/M000036.html');return false;">
|
228
|
-
<span class="method-name">age=</span><span class="method-args">(age)</span>
|
229
|
-
</a>
|
230
|
-
</div>
|
231
|
-
|
232
|
-
<div class="method-description">
|
233
|
-
</div>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
<div id="method-M000034" class="method-detail">
|
237
|
-
<a name="M000034"></a>
|
238
|
-
|
239
|
-
<div class="method-heading">
|
240
|
-
<a href="GameObject.src/M000034.html" target="Code" class="method-signature"
|
241
|
-
onclick="popupCode('GameObject.src/M000034.html');return false;">
|
242
|
-
<span class="method-name">move</span><span class="method-args">(elapsed_time)</span>
|
243
|
-
</a>
|
244
|
-
</div>
|
245
|
-
|
246
|
-
<div class="method-description">
|
247
|
-
<p>
|
248
|
-
Move according to vector over the given number of seconds.
|
249
|
-
</p>
|
250
|
-
</div>
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<div id="method-M000033" class="method-detail">
|
254
|
-
<a name="M000033"></a>
|
255
|
-
|
256
|
-
<div class="method-heading">
|
257
|
-
<a href="GameObject.src/M000033.html" target="Code" class="method-signature"
|
258
|
-
onclick="popupCode('GameObject.src/M000033.html');return false;">
|
259
|
-
<span class="method-name">size=</span><span class="method-args">(v)</span>
|
260
|
-
</a>
|
261
|
-
</div>
|
262
|
-
|
263
|
-
<div class="method-description">
|
264
|
-
<p>
|
265
|
-
Size must be positive.
|
266
|
-
</p>
|
267
|
-
</div>
|
268
|
-
</div>
|
269
|
-
|
270
|
-
|
271
|
-
</div>
|
272
|
-
|
273
|
-
|
274
|
-
</div>
|
275
|
-
|
276
|
-
|
277
|
-
<div id="validator-badges">
|
278
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
279
|
-
</div>
|
280
|
-
|
281
|
-
</body>
|
282
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (GameObject)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 95</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">location</span> = <span class="ruby-constant">Location</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">color</span> = <span class="ruby-constant">Color</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">vector</span> = <span class="ruby-constant">Vector</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">age</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">size</span> = <span class="ruby-value">1</span>, <span class="ruby-identifier">tags</span> = [])
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">location</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">color</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vector</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">age</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">size</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">tags</span> = <span class="ruby-identifier">name</span>, <span class="ruby-identifier">location</span>, <span class="ruby-identifier">color</span>, <span class="ruby-identifier">vector</span>, <span class="ruby-identifier">age</span>, <span class="ruby-identifier">size</span>, <span class="ruby-identifier">tags</span>
|
16
|
-
<span class="ruby-ivar">@identifier</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-value">99999999</span>) <span class="ruby-comment cmt">#TODO: Current setup won't necessarily be unique.</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>size= (GameObject)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 101</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size=</span>(<span class="ruby-identifier">v</span>); <span class="ruby-identifier">v</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>; <span class="ruby-ivar">@size</span> = <span class="ruby-identifier">v</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
-
</body>
|
16
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>move (GameObject)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 104</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move</span> (<span class="ruby-identifier">elapsed_time</span>)
|
15
|
-
<span class="ruby-ivar">@location</span>.<span class="ruby-identifier">x</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@vector</span>.<span class="ruby-identifier">x</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">elapsed_time</span>
|
16
|
-
<span class="ruby-ivar">@location</span>.<span class="ruby-identifier">y</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@vector</span>.<span class="ruby-identifier">y</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">elapsed_time</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>age (GameObject)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 110</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">age</span>; <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@birth_time</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
-
</body>
|
16
|
-
</html>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>age= (GameObject)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 111</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">age=</span>(<span class="ruby-identifier">age</span>); <span class="ruby-ivar">@birth_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">age</span>; <span class="ruby-keyword kw">end</span></pre>
|
15
|
-
</body>
|
16
|
-
</html>
|
data/doc/classes/Location.html
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Location</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Location</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/zyps_rb.html">
|
59
|
-
lib/zyps.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<p>
|
83
|
-
An object‘s location, with x and y coordinates.
|
84
|
-
</p>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="method-list">
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
93
|
-
|
94
|
-
<div class="name-list">
|
95
|
-
<a href="#M000021">new</a>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
|
102
|
-
<!-- if includes -->
|
103
|
-
|
104
|
-
<div id="section">
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<div id="attribute-list">
|
111
|
-
<h3 class="section-bar">Attributes</h3>
|
112
|
-
|
113
|
-
<div class="name-list">
|
114
|
-
<table>
|
115
|
-
<tr class="top-aligned-row context-row">
|
116
|
-
<td class="context-item-name">x</td>
|
117
|
-
<td class="context-item-value"> [RW] </td>
|
118
|
-
<td class="context-item-desc">
|
119
|
-
Coordinates can be negative, and don‘t have to be integers.
|
120
|
-
|
121
|
-
</td>
|
122
|
-
</tr>
|
123
|
-
<tr class="top-aligned-row context-row">
|
124
|
-
<td class="context-item-name">y</td>
|
125
|
-
<td class="context-item-value"> [RW] </td>
|
126
|
-
<td class="context-item-desc">
|
127
|
-
Coordinates can be negative, and don‘t have to be integers.
|
128
|
-
|
129
|
-
</td>
|
130
|
-
</tr>
|
131
|
-
</table>
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<!-- if method_list -->
|
138
|
-
<div id="methods">
|
139
|
-
<h3 class="section-bar">Public Class methods</h3>
|
140
|
-
|
141
|
-
<div id="method-M000021" class="method-detail">
|
142
|
-
<a name="M000021"></a>
|
143
|
-
|
144
|
-
<div class="method-heading">
|
145
|
-
<a href="Location.src/M000021.html" target="Code" class="method-signature"
|
146
|
-
onclick="popupCode('Location.src/M000021.html');return false;">
|
147
|
-
<span class="method-name">new</span><span class="method-args">(x = 0, y = 0)</span>
|
148
|
-
</a>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="method-description">
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
|
155
|
-
|
156
|
-
</div>
|
157
|
-
|
158
|
-
|
159
|
-
</div>
|
160
|
-
|
161
|
-
|
162
|
-
<div id="validator-badges">
|
163
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
164
|
-
</div>
|
165
|
-
|
166
|
-
</body>
|
167
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (Location)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/zyps.rb, line 234</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">x</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">y</span> = <span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">x</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">y</span> = <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|