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 public class
42 TriggerUsed
43 extends GBEvent
44
45 implements IWorldEvent, IWorldChangeEvent
46
47 {
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 public TriggerUsed(
63 boolean Success, UnrealId Target) {
64
65 this.Success = Success;
66
67 this.Target = Target;
68
69 }
70
71
72
73 public static final String PROTOTYPE =
74 "TRGUSED {Success False} {Target unreal_id}";
75
76
77
78
79
80
81
82
83 protected
84 boolean Success =
85 false;
86
87
88
89
90
91
92 public
93 boolean isSuccess() {
94 return
95 Success;
96 }
97
98
99
100
101
102
103
104 protected
105 UnrealId Target =
106 null;
107
108
109
110
111
112
113 public
114 UnrealId getTarget() {
115 return
116 Target;
117 }
118
119
120
121
122
123
124
125
126
127 public long getSimTime() {
128
129 return 0;
130 }
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147 public TriggerUsed(TriggerUsed original) {
148
149 this.Success=original.Success;
150
151 this.Target=original.Target;
152
153 }
154
155
156
157
158
159 public TriggerUsed() {
160 }
161
162
163
164 public String toString() {
165 return
166
167 super.toString() + " | " +
168
169 "Success = " +
170 String.valueOf(Success) + " | " +
171
172 "Target = " +
173 String.valueOf(Target) + " | " +
174 "";
175
176 }
177
178 public String toHtmlString() {
179 return super.toString() +
180
181 "<b>Success</b> : " +
182 String.valueOf(Success) +
183 " <br/> " +
184
185 "<b>Target</b> : " +
186 String.valueOf(Target) +
187 " <br/> " +
188 "";
189 }
190
191
192
193 }
194
195