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 Synchronous message. Begin message signalizes start of
35 synchronous batch. In the batch are send information about
36 visible navpoints, game status, items and so on.
37
38 Corresponding GameBots message is
39 BEG.
40
41 */
42
43 public class
44 BeginMessage
45 extends GBEvent
46
47 implements IWorldEvent, IWorldChangeEvent
48
49 {
50
51 /**
52 Creates new instance of command BeginMessage.
53
54 Synchronous message. Begin message signalizes start of
55 synchronous batch. In the batch are send information about
56 visible navpoints, game status, items and so on.
57 Corresponding GameBots message for this command is
58 .
59 @param Time Timestamp form the GameBots.
60 */
61 public BeginMessage(
62 double Time) {
63
64 this.Time = Time;
65
66 }
67
68
69 /** Example how the message looks like - used during parser tests. */
70 public static final String PROTOTYPE =
71 "BEG {Time 0}";
72
73
74 /////// Properties BEGIN
75
76 /**
77 Timestamp form the GameBots. */
78 protected
79 double Time =
80 0;
81
82
83 /**
84 Timestamp form the GameBots. */
85 public
86 double getTime() {
87 return
88 Time;
89 }
90
91
92
93 /////// Properties END
94
95 /////// Extra Java code BEGIN
96
97 /////// Additional code from xslt BEGIN
98
99 public long getSimTime() {
100 // NOT IMPLEMENTED FOR UDK
101 return 0;
102 }
103
104
105
106 /////// Additional code from xslt END
107
108 /////// Extra Java from XML BEGIN
109
110 /////// Extra Java from XML END
111
112 /////// Extra Java code END
113
114
115
116 /**
117 * Cloning constructor.
118 */
119 public BeginMessage(BeginMessage original) {
120
121 this.Time=original.Time;
122
123 }
124
125
126 /**
127 * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
128 */
129 public BeginMessage() {
130 }
131
132
133
134 public String toString() {
135 return
136
137 super.toString() + " | " +
138
139 "Time = " +
140 String.valueOf(Time) + " | " +
141 "";
142
143 }
144
145 public String toHtmlString() {
146 return super.toString() +
147
148 "<b>Time</b> : " +
149 String.valueOf(Time) +
150 " <br/> " +
151 "";
152 }
153
154
155
156 }
157
158