1
2
3
4
5
6
7
8
9
10
11
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13
14
15
16
17
18 public class Jump
19 extends CommandMessage
20 {
21
22
23
24 public static final String PROTOTYPE =
25 " {DoubleJump False} {Delay 0} {Force 0} ";
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public Jump(
45 Boolean DoubleJump, Double Delay, Double Force
46 ) {
47
48 this.DoubleJump = DoubleJump;
49
50 this.Delay = Delay;
51
52 this.Force = Force;
53
54 }
55
56
57
58
59
60
61
62
63
64
65 public Jump() {
66 }
67
68
69
70
71
72
73
74 public Jump(Jump original) {
75
76 this.DoubleJump = original.DoubleJump;
77
78 this.Delay = original.Delay;
79
80 this.Force = original.Force;
81
82 }
83
84
85
86
87
88
89 protected
90 Boolean DoubleJump =
91
92 null
93 ;
94
95
96
97
98
99
100
101
102 public Boolean isDoubleJump()
103
104 {
105 return
106 DoubleJump;
107 }
108
109
110
111
112
113
114
115
116
117 public Jump
118 setDoubleJump(Boolean DoubleJump)
119
120 {
121 this.DoubleJump = DoubleJump;
122 return this;
123 }
124
125
126
127
128
129
130 protected
131 Double Delay =
132
133 null
134 ;
135
136
137
138
139
140
141
142
143 public Double getDelay()
144
145 {
146 return
147 Delay;
148 }
149
150
151
152
153
154
155
156
157
158 public Jump
159 setDelay(Double Delay)
160
161 {
162 this.Delay = Delay;
163 return this;
164 }
165
166
167
168
169
170
171 protected
172 Double Force =
173
174 null
175 ;
176
177
178
179
180
181
182
183
184 public Double getForce()
185
186 {
187 return
188 Force;
189 }
190
191
192
193
194
195
196
197
198
199 public Jump
200 setForce(Double Force)
201
202 {
203 this.Force = Force;
204 return this;
205 }
206
207 public String toString() {
208 return toMessage();
209 }
210
211 public String toHtmlString() {
212 return super.toString() + "[<br/>" +
213
214 "<b>DoubleJump</b> = " +
215 String.valueOf(isDoubleJump()
216 ) +
217 " <br/> " +
218
219 "<b>Delay</b> = " +
220 String.valueOf(getDelay()
221 ) +
222 " <br/> " +
223
224 "<b>Force</b> = " +
225 String.valueOf(getForce()
226 ) +
227 " <br/> " +
228
229 "<br/>]"
230 ;
231 }
232
233 public String toMessage() {
234 StringBuffer buf = new StringBuffer();
235 buf.append("JUMP");
236
237 if (DoubleJump != null) {
238 buf.append(" {DoubleJump " + DoubleJump + "}");
239 }
240
241 if (Delay != null) {
242 buf.append(" {Delay " + Delay + "}");
243 }
244
245 if (Force != null) {
246 buf.append(" {Force " + Force + "}");
247 }
248
249 return buf.toString();
250 }
251
252
253
254
255
256 }
257