1
2 /**
3 IMPORTANT !!!
4
5 DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
6 THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7
8 IMPORTANT END !!!
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 Asynchronous message. When we trigger some trigger. TODO:
35 Experiment message.
36
37 Corresponding GameBots message is
38 TRG.
39
40 */
41
42 public class
43 Trigger
44 extends GBEvent
45
46 implements IWorldEvent, IWorldChangeEvent
47
48 {
49
50 /**
51 Creates new instance of command Trigger.
52
53 Asynchronous message. When we trigger some trigger. TODO:
54 Experiment message.
55 Corresponding GameBots message for this command is
56 .
57 @param Actor
58 Should be the trigger we have triggered.
59
60 @param EventInstigator
61 Should be the Id of the player who triggered this
62 (ourself?).
63
64 */
65 public Trigger(
66 String Actor, UnrealId EventInstigator) {
67
68 this.Actor = Actor;
69
70 this.EventInstigator = EventInstigator;
71
72 }
73
74
75 /** Example how the message looks like - used during parser tests. */
76 public static final String PROTOTYPE =
77 "TRG {Actor text} {EventInstigator unreal_id}";
78
79
80 /////// Properties BEGIN
81
82 /**
83
84 Should be the trigger we have triggered.
85 */
86 protected
87 String Actor =
88 null;
89
90
91 /**
92
93 Should be the trigger we have triggered.
94 */
95 public
96 String getActor() {
97 return
98 Actor;
99 }
100
101
102
103 /**
104
105 Should be the Id of the player who triggered this
106 (ourself?).
107 */
108 protected
109 UnrealId EventInstigator =
110 null;
111
112
113 /**
114
115 Should be the Id of the player who triggered this
116 (ourself?).
117 */
118 public
119 UnrealId getEventInstigator() {
120 return
121 EventInstigator;
122 }
123
124
125
126 /////// Properties END
127
128 /////// Extra Java code BEGIN
129
130 /////// Additional code from xslt BEGIN
131
132 public long getSimTime() {
133 // NOT IMPLEMENTED FOR UDK
134 return 0;
135 }
136
137
138
139 /////// Additional code from xslt END
140
141 /////// Extra Java from XML BEGIN
142
143 /////// Extra Java from XML END
144
145 /////// Extra Java code END
146
147
148
149 /**
150 * Cloning constructor.
151 */
152 public Trigger(Trigger original) {
153
154 this.Actor=original.Actor;
155
156 this.EventInstigator=original.EventInstigator;
157
158 }
159
160
161 /**
162 * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
163 */
164 public Trigger() {
165 }
166
167
168
169 public String toString() {
170 return
171
172 super.toString() + " | " +
173
174 "Actor = " +
175 String.valueOf(Actor) + " | " +
176
177 "EventInstigator = " +
178 String.valueOf(EventInstigator) + " | " +
179 "";
180
181 }
182
183 public String toHtmlString() {
184 return super.toString() +
185
186 "<b>Actor</b> : " +
187 String.valueOf(Actor) +
188 " <br/> " +
189
190 "<b>EventInstigator</b> : " +
191 String.valueOf(EventInstigator) +
192 " <br/> " +
193 "";
194 }
195
196
197
198 }
199
200