1 package cz.cuni.amis.pogamut.defcon.communication.messages.infos;
2
3 import cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation;
4 import cz.cuni.amis.pogamut.defcon.consts.Event;
5 import cz.cuni.amis.pogamut.defcon.consts.UnitType;
6
7
8
9
10
11
12
13
14 public class DefConWorldEvent extends DefConEvent {
15
16
17
18 private Event eventType;
19
20
21
22
23 private int causeObjectId;
24
25
26
27
28 private int targetObjectId;
29
30
31
32
33 private UnitType unitType;
34
35
36
37
38 private DefConLocation location;
39
40
41
42
43
44
45
46
47
48
49
50 public DefConWorldEvent(Event eventType, int causeObjectId, int targetObjectId,
51 UnitType unitType, DefConLocation location, double time) {
52 super(time);
53 this.eventType = eventType;
54 this.causeObjectId = causeObjectId;
55 this.targetObjectId = targetObjectId;
56 this.unitType = unitType;
57 this.location = location;
58 }
59
60
61
62
63
64
65 public Event getEventType() {
66 return eventType;
67 }
68
69
70
71
72
73
74 public int getCauseObjectId() {
75 return causeObjectId;
76 }
77
78
79
80
81
82
83 public int getTargetObjectId() {
84 return targetObjectId;
85 }
86
87
88
89
90
91
92 public UnitType getUnitType() {
93 return unitType;
94 }
95
96
97
98
99
100
101 public DefConLocation getLocation() {
102 return location;
103 }
104
105
106
107
108
109
110 @Override
111 public String getStringizedFields() {
112 return super.getStringizedFields() + "; eventType: " + eventType + "; causeObjectId: " +
113 causeObjectId + "; targetObjectId: " + targetObjectId + "; unitType: " + unitType +
114 "; location: " + location.toString();
115 }
116 }