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 PlayerScore
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
63
64
65
66
67
68 public PlayerScore(
69 double lastSeenTime, UnrealId Id, int Score, int Deaths) {
70
71 this.lastSeenTime = lastSeenTime;
72
73 this.Id = Id;
74
75 this.Score = Score;
76
77 this.Deaths = Deaths;
78
79 }
80
81
82
83 public static final String PROTOTYPE =
84 "PLS {Id unreal_id} {Score 0} {Deaths 0}";
85
86
87
88
89
90
91
92
93
94 protected
95 double lastSeenTime =
96 0;
97
98
99
100
101
102
103
104 public
105 double getLastSeenTime() {
106 return
107 lastSeenTime;
108 }
109
110
111
112
113
114 protected
115 UnrealId Id =
116 null;
117
118
119
120
121 public
122 UnrealId getId() {
123 return
124 Id;
125 }
126
127
128
129
130
131
132
133
134
135
136 protected
137 int Score =
138 0;
139
140
141
142
143
144
145
146
147
148 public
149 int getScore() {
150 return
151 Score;
152 }
153
154
155
156
157
158 protected
159 int Deaths =
160 0;
161
162
163
164
165 public
166 int getDeaths() {
167 return
168 Deaths;
169 }
170
171
172
173
174
175
176
177
178
179 public long getSimTime() {
180
181 return 0;
182 }
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199 public PlayerScore(PlayerScore original) {
200
201 this.lastSeenTime=original.lastSeenTime;
202
203 this.Id=original.Id;
204
205 this.Score=original.Score;
206
207 this.Deaths=original.Deaths;
208
209 }
210
211
212
213
214
215 public PlayerScore() {
216 }
217
218
219
220 public String toString() {
221 return
222
223 super.toString() + " | " +
224
225 "Id = " +
226 String.valueOf(Id) + " | " +
227
228 "Score = " +
229 String.valueOf(Score) + " | " +
230
231 "Deaths = " +
232 String.valueOf(Deaths) + " | " +
233 "";
234
235 }
236
237 public String toHtmlString() {
238 return super.toString() +
239
240 "<b>lastSeenTime</b> : " +
241 String.valueOf(lastSeenTime) +
242 " <br/> " +
243
244 "<b>Id</b> : " +
245 String.valueOf(Id) +
246 " <br/> " +
247
248 "<b>Score</b> : " +
249 String.valueOf(Score) +
250 " <br/> " +
251
252 "<b>Deaths</b> : " +
253 String.valueOf(Deaths) +
254 " <br/> " +
255 "";
256 }
257
258
259
260 }
261
262