zyps 0.4.1 → 0.5.1
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.
- 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/Behavior.html
DELETED
|
@@ -1,202 +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: Behavior</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">Behavior</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
|
-
A behavior that a <a href="Creature.html">Creature</a> engages in. The
|
|
84
|
-
target can have its tags or colors changed, it can be "herded",
|
|
85
|
-
it can be destroyed, or any other action the library user can dream up.
|
|
86
|
-
Likewise, the subject can change its own attributes, it can approach or
|
|
87
|
-
flee from the target, it can spawn <a href="Behavior.html#M000001">new</a>
|
|
88
|
-
Creatures or GameObjects (like bullets), or anything else.
|
|
89
|
-
</p>
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div id="method-list">
|
|
97
|
-
<h3 class="section-bar">Methods</h3>
|
|
98
|
-
|
|
99
|
-
<div class="name-list">
|
|
100
|
-
<a href="#M000001">new</a>
|
|
101
|
-
<a href="#M000002">perform</a>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<!-- if includes -->
|
|
109
|
-
|
|
110
|
-
<div id="section">
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<div id="attribute-list">
|
|
117
|
-
<h3 class="section-bar">Attributes</h3>
|
|
118
|
-
|
|
119
|
-
<div class="name-list">
|
|
120
|
-
<table>
|
|
121
|
-
<tr class="top-aligned-row context-row">
|
|
122
|
-
<td class="context-item-name">actions</td>
|
|
123
|
-
<td class="context-item-value"> [RW] </td>
|
|
124
|
-
<td class="context-item-desc">
|
|
125
|
-
A list of <a href="Action.html">Action</a> objects, which are called with
|
|
126
|
-
the object and its target when all conditions are met. An action can act on
|
|
127
|
-
the subject or its target.
|
|
128
|
-
|
|
129
|
-
</td>
|
|
130
|
-
</tr>
|
|
131
|
-
<tr class="top-aligned-row context-row">
|
|
132
|
-
<td class="context-item-name">conditions</td>
|
|
133
|
-
<td class="context-item-value"> [RW] </td>
|
|
134
|
-
<td class="context-item-desc">
|
|
135
|
-
A list of <a href="Condition.html">Condition</a> objects, which are called
|
|
136
|
-
with the object itself and its target. A condition can consider the tags on
|
|
137
|
-
the target, the distance from the subject, or any other criteria. If any
|
|
138
|
-
condition returns false, the behavior will not be carried out.
|
|
139
|
-
|
|
140
|
-
</td>
|
|
141
|
-
</tr>
|
|
142
|
-
</table>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<!-- if method_list -->
|
|
149
|
-
<div id="methods">
|
|
150
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
151
|
-
|
|
152
|
-
<div id="method-M000001" class="method-detail">
|
|
153
|
-
<a name="M000001"></a>
|
|
154
|
-
|
|
155
|
-
<div class="method-heading">
|
|
156
|
-
<a href="Behavior.src/M000001.html" target="Code" class="method-signature"
|
|
157
|
-
onclick="popupCode('Behavior.src/M000001.html');return false;">
|
|
158
|
-
<span class="method-name">new</span><span class="method-args">(actions = [], conditions = [])</span>
|
|
159
|
-
</a>
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<div class="method-description">
|
|
163
|
-
<p>
|
|
164
|
-
Optionally takes an array of actions and one of conditions.
|
|
165
|
-
</p>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
170
|
-
|
|
171
|
-
<div id="method-M000002" class="method-detail">
|
|
172
|
-
<a name="M000002"></a>
|
|
173
|
-
|
|
174
|
-
<div class="method-heading">
|
|
175
|
-
<a href="Behavior.src/M000002.html" target="Code" class="method-signature"
|
|
176
|
-
onclick="popupCode('Behavior.src/M000002.html');return false;">
|
|
177
|
-
<span class="method-name">perform</span><span class="method-args">(subject, target)</span>
|
|
178
|
-
</a>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<div class="method-description">
|
|
182
|
-
<p>
|
|
183
|
-
Calls each Proc object in the list of conditions with the subject and its
|
|
184
|
-
target. Returns nil if any condition returns false. Then calls each Proc
|
|
185
|
-
object in the list of actions, also with the subject and its target.
|
|
186
|
-
</p>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</div>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</div>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<div id="validator-badges">
|
|
198
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
199
|
-
</div>
|
|
200
|
-
|
|
201
|
-
</body>
|
|
202
|
-
</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 (Behavior)</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 170</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">actions</span> = [], <span class="ruby-identifier">conditions</span> = [])
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">actions</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conditions</span> = <span class="ruby-identifier">actions</span>, <span class="ruby-identifier">conditions</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</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>perform (Behavior)</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 176</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-identifier">conditions</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">condition</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">condition</span>.<span class="ruby-identifier">test</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">target</span>)}
|
|
16
|
-
<span class="ruby-identifier">actions</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">action</span><span class="ruby-operator">|</span> <span class="ruby-identifier">action</span>.<span class="ruby-identifier">do</span>(<span class="ruby-identifier">subject</span>, <span class="ruby-identifier">target</span>)}
|
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,181 +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: BlendAction</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">BlendAction</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr class="top-aligned-row">
|
|
56
|
-
<td><strong>In:</strong></td>
|
|
57
|
-
<td>
|
|
58
|
-
<a href="../files/lib/zyps/actions_rb.html">
|
|
59
|
-
lib/zyps/actions.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
|
-
<a href="Action.html">
|
|
69
|
-
Action
|
|
70
|
-
</a>
|
|
71
|
-
</td>
|
|
72
|
-
</tr>
|
|
73
|
-
</table>
|
|
74
|
-
</div>
|
|
75
|
-
<!-- banner header -->
|
|
76
|
-
|
|
77
|
-
<div id="bodyContent">
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div id="contextContent">
|
|
82
|
-
|
|
83
|
-
<div id="description">
|
|
84
|
-
<p>
|
|
85
|
-
Blend the target‘s color with another color.
|
|
86
|
-
</p>
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div id="method-list">
|
|
94
|
-
<h3 class="section-bar">Methods</h3>
|
|
95
|
-
|
|
96
|
-
<div class="name-list">
|
|
97
|
-
<a href="#M000044">do</a>
|
|
98
|
-
<a href="#M000043">new</a>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<!-- if includes -->
|
|
106
|
-
|
|
107
|
-
<div id="section">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<div id="attribute-list">
|
|
114
|
-
<h3 class="section-bar">Attributes</h3>
|
|
115
|
-
|
|
116
|
-
<div class="name-list">
|
|
117
|
-
<table>
|
|
118
|
-
<tr class="top-aligned-row context-row">
|
|
119
|
-
<td class="context-item-name">color</td>
|
|
120
|
-
<td class="context-item-value"> [RW] </td>
|
|
121
|
-
<td class="context-item-desc">
|
|
122
|
-
<a href="Color.html">Color</a> to apply to target.
|
|
123
|
-
|
|
124
|
-
</td>
|
|
125
|
-
</tr>
|
|
126
|
-
</table>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<!-- if method_list -->
|
|
133
|
-
<div id="methods">
|
|
134
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
135
|
-
|
|
136
|
-
<div id="method-M000043" class="method-detail">
|
|
137
|
-
<a name="M000043"></a>
|
|
138
|
-
|
|
139
|
-
<div class="method-heading">
|
|
140
|
-
<a href="BlendAction.src/M000043.html" target="Code" class="method-signature"
|
|
141
|
-
onclick="popupCode('BlendAction.src/M000043.html');return false;">
|
|
142
|
-
<span class="method-name">new</span><span class="method-args">(color)</span>
|
|
143
|
-
</a>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<div class="method-description">
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
151
|
-
|
|
152
|
-
<div id="method-M000044" class="method-detail">
|
|
153
|
-
<a name="M000044"></a>
|
|
154
|
-
|
|
155
|
-
<div class="method-heading">
|
|
156
|
-
<a href="BlendAction.src/M000044.html" target="Code" class="method-signature"
|
|
157
|
-
onclick="popupCode('BlendAction.src/M000044.html');return false;">
|
|
158
|
-
<span class="method-name">do</span><span class="method-args">(actor, target)</span>
|
|
159
|
-
</a>
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<div class="method-description">
|
|
163
|
-
<p>
|
|
164
|
-
Blend the target‘s color with the assigned color.
|
|
165
|
-
</p>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
</div>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<div id="validator-badges">
|
|
177
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
178
|
-
</div>
|
|
179
|
-
|
|
180
|
-
</body>
|
|
181
|
-
</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 (BlendAction)</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/actions.rb, line 179</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">color</span>)
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">color</span> = <span class="ruby-identifier">color</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</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>do (BlendAction)</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/actions.rb, line 183</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">do</span>(<span class="ruby-identifier">actor</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-identifier">target</span>.<span class="ruby-identifier">color</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@color</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
data/doc/classes/Clock.html
DELETED
|
@@ -1,165 +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: Clock</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">Clock</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
|
-
A clock to use for timing actions.
|
|
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="#M000042">elapsed_time</a>
|
|
96
|
-
<a href="#M000041">new</a>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<!-- if includes -->
|
|
104
|
-
|
|
105
|
-
<div id="section">
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<!-- if method_list -->
|
|
115
|
-
<div id="methods">
|
|
116
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
117
|
-
|
|
118
|
-
<div id="method-M000041" class="method-detail">
|
|
119
|
-
<a name="M000041"></a>
|
|
120
|
-
|
|
121
|
-
<div class="method-heading">
|
|
122
|
-
<a href="Clock.src/M000041.html" target="Code" class="method-signature"
|
|
123
|
-
onclick="popupCode('Clock.src/M000041.html');return false;">
|
|
124
|
-
<span class="method-name">new</span><span class="method-args">()</span>
|
|
125
|
-
</a>
|
|
126
|
-
</div>
|
|
127
|
-
|
|
128
|
-
<div class="method-description">
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
|
|
132
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
133
|
-
|
|
134
|
-
<div id="method-M000042" class="method-detail">
|
|
135
|
-
<a name="M000042"></a>
|
|
136
|
-
|
|
137
|
-
<div class="method-heading">
|
|
138
|
-
<a href="Clock.src/M000042.html" target="Code" class="method-signature"
|
|
139
|
-
onclick="popupCode('Clock.src/M000042.html');return false;">
|
|
140
|
-
<span class="method-name">elapsed_time</span><span class="method-args">()</span>
|
|
141
|
-
</a>
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<div class="method-description">
|
|
145
|
-
<p>
|
|
146
|
-
Returns the time in (fractional) seconds since this method was last called
|
|
147
|
-
(or on the first call, time since the <a href="Clock.html">Clock</a> was
|
|
148
|
-
created).
|
|
149
|
-
</p>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<div id="validator-badges">
|
|
161
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
</body>
|
|
165
|
-
</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 (Clock)</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 294</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
|
15
|
-
<span class="ruby-ivar">@last_check_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,21 +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>elapsed_time (Clock)</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 299</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elapsed_time</span>
|
|
15
|
-
<span class="ruby-identifier">time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">to_f</span>
|
|
16
|
-
<span class="ruby-identifier">elapsed_time</span> = <span class="ruby-identifier">time</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@last_check_time</span>
|
|
17
|
-
<span class="ruby-ivar">@last_check_time</span> = <span class="ruby-identifier">time</span>
|
|
18
|
-
<span class="ruby-identifier">elapsed_time</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|