1
2
3
4
5
6
7
8
9
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32
33
34
35
36
37
38
39
40
41
42 public class
43 VolumeChanged
44 extends GBEvent
45
46 implements IWorldEvent, IWorldChangeEvent
47
48 {
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99 public VolumeChanged(
100 String Id, Velocity ZoneVelocity, Velocity ZoneGravity, double GroundFriction, double FluidFriction, double TerminalVelocity, boolean WaterVolume, boolean PainCausing, boolean Destructive, double DamagePerSec, String DamageType, boolean NoInventory, boolean MoveProjectiles, boolean NeutralZone) {
101
102 this.Id = Id;
103
104 this.ZoneVelocity = ZoneVelocity;
105
106 this.ZoneGravity = ZoneGravity;
107
108 this.GroundFriction = GroundFriction;
109
110 this.FluidFriction = FluidFriction;
111
112 this.TerminalVelocity = TerminalVelocity;
113
114 this.WaterVolume = WaterVolume;
115
116 this.PainCausing = PainCausing;
117
118 this.Destructive = Destructive;
119
120 this.DamagePerSec = DamagePerSec;
121
122 this.DamageType = DamageType;
123
124 this.NoInventory = NoInventory;
125
126 this.MoveProjectiles = MoveProjectiles;
127
128 this.NeutralZone = NeutralZone;
129
130 }
131
132
133
134 public static final String PROTOTYPE =
135 "VCH {Id text} {ZoneVelocity 0,0,0} {ZoneGravity 0,0,0} {GroundFriction 0} {FluidFriction 0} {TerminalVelocity 0} {WaterVolume False} {PainCausing False} {Destructive False} {DamagePerSec 0} {DamageType text} {NoInventory False} {MoveProjectiles False} {NeutralZone False}";
136
137
138
139
140
141
142 protected
143 String Id =
144 null;
145
146
147
148
149 public
150 String getId() {
151 return
152 Id;
153 }
154
155
156
157
158
159
160
161 protected
162 Velocity ZoneVelocity =
163 null;
164
165
166
167
168
169
170 public
171 Velocity getZoneVelocity() {
172 return
173 ZoneVelocity;
174 }
175
176
177
178
179
180
181
182 protected
183 Velocity ZoneGravity =
184 null;
185
186
187
188
189
190
191 public
192 Velocity getZoneGravity() {
193 return
194 ZoneGravity;
195 }
196
197
198
199
200
201
202
203 protected
204 double GroundFriction =
205 0;
206
207
208
209
210
211
212 public
213 double getGroundFriction() {
214 return
215 GroundFriction;
216 }
217
218
219
220
221
222
223
224 protected
225 double FluidFriction =
226 0;
227
228
229
230
231
232
233 public
234 double getFluidFriction() {
235 return
236 FluidFriction;
237 }
238
239
240
241
242
243
244
245 protected
246 double TerminalVelocity =
247 0;
248
249
250
251
252
253
254 public
255 double getTerminalVelocity() {
256 return
257 TerminalVelocity;
258 }
259
260
261
262
263
264
265
266 protected
267 boolean WaterVolume =
268 false;
269
270
271
272
273
274
275 public
276 boolean isWaterVolume() {
277 return
278 WaterVolume;
279 }
280
281
282
283
284
285
286
287
288 protected
289 boolean PainCausing =
290 false;
291
292
293
294
295
296
297
298 public
299 boolean isPainCausing() {
300 return
301 PainCausing;
302 }
303
304
305
306
307
308
309
310 protected
311 boolean Destructive =
312 false;
313
314
315
316
317
318
319 public
320 boolean isDestructive() {
321 return
322 Destructive;
323 }
324
325
326
327
328
329
330
331 protected
332 double DamagePerSec =
333 0;
334
335
336
337
338
339
340 public
341 double getDamagePerSec() {
342 return
343 DamagePerSec;
344 }
345
346
347
348
349
350
351
352 protected
353 String DamageType =
354 null;
355
356
357
358
359
360
361 public
362 String getDamageType() {
363 return
364 DamageType;
365 }
366
367
368
369
370
371
372
373 protected
374 boolean NoInventory =
375 false;
376
377
378
379
380
381
382 public
383 boolean isNoInventory() {
384 return
385 NoInventory;
386 }
387
388
389
390
391
392
393
394 protected
395 boolean MoveProjectiles =
396 false;
397
398
399
400
401
402
403 public
404 boolean isMoveProjectiles() {
405 return
406 MoveProjectiles;
407 }
408
409
410
411
412
413
414
415 protected
416 boolean NeutralZone =
417 false;
418
419
420
421
422
423
424 public
425 boolean isNeutralZone() {
426 return
427 NeutralZone;
428 }
429
430
431
432
433
434
435
436
437
438 public long getSimTime() {
439
440 return 0;
441 }
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458 public VolumeChanged(VolumeChanged original) {
459
460 this.Id=original.Id;
461
462 this.ZoneVelocity=original.ZoneVelocity;
463
464 this.ZoneGravity=original.ZoneGravity;
465
466 this.GroundFriction=original.GroundFriction;
467
468 this.FluidFriction=original.FluidFriction;
469
470 this.TerminalVelocity=original.TerminalVelocity;
471
472 this.WaterVolume=original.WaterVolume;
473
474 this.PainCausing=original.PainCausing;
475
476 this.Destructive=original.Destructive;
477
478 this.DamagePerSec=original.DamagePerSec;
479
480 this.DamageType=original.DamageType;
481
482 this.NoInventory=original.NoInventory;
483
484 this.MoveProjectiles=original.MoveProjectiles;
485
486 this.NeutralZone=original.NeutralZone;
487
488 }
489
490
491
492
493
494 public VolumeChanged() {
495 }
496
497
498
499 public String toString() {
500 return
501
502 super.toString() + " | " +
503
504 "Id = " +
505 String.valueOf(Id) + " | " +
506
507 "ZoneVelocity = " +
508 String.valueOf(ZoneVelocity) + " | " +
509
510 "ZoneGravity = " +
511 String.valueOf(ZoneGravity) + " | " +
512
513 "GroundFriction = " +
514 String.valueOf(GroundFriction) + " | " +
515
516 "FluidFriction = " +
517 String.valueOf(FluidFriction) + " | " +
518
519 "TerminalVelocity = " +
520 String.valueOf(TerminalVelocity) + " | " +
521
522 "WaterVolume = " +
523 String.valueOf(WaterVolume) + " | " +
524
525 "PainCausing = " +
526 String.valueOf(PainCausing) + " | " +
527
528 "Destructive = " +
529 String.valueOf(Destructive) + " | " +
530
531 "DamagePerSec = " +
532 String.valueOf(DamagePerSec) + " | " +
533
534 "DamageType = " +
535 String.valueOf(DamageType) + " | " +
536
537 "NoInventory = " +
538 String.valueOf(NoInventory) + " | " +
539
540 "MoveProjectiles = " +
541 String.valueOf(MoveProjectiles) + " | " +
542
543 "NeutralZone = " +
544 String.valueOf(NeutralZone) + " | " +
545 "";
546
547 }
548
549 public String toHtmlString() {
550 return super.toString() +
551
552 "<b>Id</b> : " +
553 String.valueOf(Id) +
554 " <br/> " +
555
556 "<b>ZoneVelocity</b> : " +
557 String.valueOf(ZoneVelocity) +
558 " <br/> " +
559
560 "<b>ZoneGravity</b> : " +
561 String.valueOf(ZoneGravity) +
562 " <br/> " +
563
564 "<b>GroundFriction</b> : " +
565 String.valueOf(GroundFriction) +
566 " <br/> " +
567
568 "<b>FluidFriction</b> : " +
569 String.valueOf(FluidFriction) +
570 " <br/> " +
571
572 "<b>TerminalVelocity</b> : " +
573 String.valueOf(TerminalVelocity) +
574 " <br/> " +
575
576 "<b>WaterVolume</b> : " +
577 String.valueOf(WaterVolume) +
578 " <br/> " +
579
580 "<b>PainCausing</b> : " +
581 String.valueOf(PainCausing) +
582 " <br/> " +
583
584 "<b>Destructive</b> : " +
585 String.valueOf(Destructive) +
586 " <br/> " +
587
588 "<b>DamagePerSec</b> : " +
589 String.valueOf(DamagePerSec) +
590 " <br/> " +
591
592 "<b>DamageType</b> : " +
593 String.valueOf(DamageType) +
594 " <br/> " +
595
596 "<b>NoInventory</b> : " +
597 String.valueOf(NoInventory) +
598 " <br/> " +
599
600 "<b>MoveProjectiles</b> : " +
601 String.valueOf(MoveProjectiles) +
602 " <br/> " +
603
604 "<b>NeutralZone</b> : " +
605 String.valueOf(NeutralZone) +
606 " <br/> " +
607 "";
608 }
609
610
611
612 }
613
614