1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 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.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 public class PlayerInput
28 extends InfoMessage
29 implements IWorldEvent, IWorldChangeEvent
30
31 {
32
33
34 public static final String PROTOTYPE =
35 "PLI {Id unreal_id} {DialogId text} {Key 0} ";
36
37
38
39
40
41
42 public PlayerInput()
43 {
44 }
45
46
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 public PlayerInput(
80 UnrealId Id, String DialogId, int Key
81 ) {
82
83 this.Id = Id;
84
85 this.DialogId = DialogId;
86
87 this.Key = Key;
88
89 }
90
91
92
93
94
95
96 public PlayerInput(PlayerInput original) {
97
98 this.Id = original.getId()
99 ;
100
101 this.DialogId = original.getDialogId()
102 ;
103
104 this.Key = original.getKey()
105 ;
106
107 this.SimTime = original.getSimTime();
108 }
109
110
111 protected long SimTime;
112
113
114
115
116 @Override
117 public long getSimTime() {
118 return SimTime;
119 }
120
121
122
123
124 protected void setSimTime(long SimTime) {
125 this.SimTime = SimTime;
126 }
127
128
129
130
131
132
133
134 protected
135 UnrealId Id =
136 null;
137
138
139
140
141
142
143 public UnrealId getId()
144 {
145 return Id;
146 }
147
148
149
150
151
152
153
154 protected
155 String DialogId =
156 null;
157
158
159
160
161
162
163 public String getDialogId()
164 {
165 return DialogId;
166 }
167
168
169
170
171
172
173
174 protected
175 int Key =
176 0;
177
178
179
180
181
182
183 public int getKey()
184 {
185 return Key;
186 }
187
188
189 public String toString() {
190 return
191 super.toString() + "[" +
192
193 "Id = " + String.valueOf(getId()
194 ) + " | " +
195
196 "DialogId = " + String.valueOf(getDialogId()
197 ) + " | " +
198
199 "Key = " + String.valueOf(getKey()
200 ) + " | " +
201
202 "]";
203 }
204
205
206 public String toHtmlString() {
207 return super.toString() + "[<br/>" +
208
209 "<b>Id</b> = " + String.valueOf(getId()
210 ) + " <br/> " +
211
212 "<b>DialogId</b> = " + String.valueOf(getDialogId()
213 ) + " <br/> " +
214
215 "<b>Key</b> = " + String.valueOf(getKey()
216 ) + " <br/> " +
217
218 "<br/>]";
219 }
220
221 public String toJsonLiteral() {
222 return "PlayerInput(null, "
223
224 + ")";
225 }
226
227
228
229
230
231
232
233
234
235
236 }
237