View Javadoc

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. Sent as a response to ENTER command. Sent if
35  		the ENTER command was successfull. Means we are now driving the vehicle.
36  		Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead.
37  	Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified.
38  	
39                            Corresponding GameBots message is
40                            ENTERED.
41                        
42               */
43              
44              public class
45              EnteredVehicle
46                      extends GBEvent
47                  
48  	            	implements IWorldEvent, IWorldChangeEvent
49  
50              {
51              
52              /**
53                Creates new instance of command EnteredVehicle.
54                
55  		Asynchronous message. Sent as a response to ENTER command. Sent if
56  		the ENTER command was successfull. Means we are now driving the vehicle.
57  		Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead.
58  	Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified.
59  	Corresponding GameBots message for this command is
60                .
61                    @param Id Id of the vehicle entered. 
62                    @param Type Type of the vehicle entered. What kind of turret or car. 
63                    @param Location Location of the vehicle.
64                */
65               public EnteredVehicle(
66                  UnrealId Id,  String Type,  Location Location) {
67                      
68                      this.Id = Id;
69                  
70                      this.Type = Type;
71                  
72                      this.Location = Location;
73                  
74                  }
75  
76              
77      	/** Example how the message looks like - used during parser tests. */
78      	public static final String PROTOTYPE =
79      		"ENTERED {Id unreal_id} {Type text} {Location 0,0,0}";
80      
81  
82              /////// Properties BEGIN
83              
84          /**
85          Id of the vehicle entered.  */
86          protected
87           UnrealId Id =
88          	null;
89  
90          
91          /**
92          Id of the vehicle entered.  */
93          public
94          UnrealId getId() {
95              return
96           Id;
97          }
98          
99  
100         
101         /**
102         Type of the vehicle entered. What kind of turret or car.  */
103         protected
104          String Type =
105         	null;
106 
107         
108         /**
109         Type of the vehicle entered. What kind of turret or car.  */
110         public
111         String getType() {
112             return
113          Type;
114         }
115         
116 
117         
118         /**
119         Location of the vehicle. */
120         protected
121          Location Location =
122         	null;
123 
124         
125         /**
126         Location of the vehicle. */
127         public
128         Location getLocation() {
129             return
130          Location;
131         }
132         
133 
134         
135             /////// Properties END
136 
137             /////// Extra Java code BEGIN
138 
139             	/////// Additional code from xslt BEGIN
140             		
141        					public long getSimTime() {
142        						// NOT IMPLEMENTED FOR UDK
143        						return 0;
144        					}
145             		
146 
147 
148             	/////// Additional code from xslt END
149 
150 	            /////// Extra Java from XML BEGIN
151             		
152             	/////// Extra Java from XML END
153 
154             /////// Extra Java code END
155 
156             
157 
158             /**
159               * Cloning constructor.
160               */
161              public EnteredVehicle(EnteredVehicle original) {
162                 
163                      this.Id=original.Id;
164                 
165                      this.Type=original.Type;
166                 
167                      this.Location=original.Location;
168                 
169              }
170 
171              
172                  /**
173                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
174                   */
175 	             public EnteredVehicle() {
176 	             }
177              
178 
179                  
180             public String toString() {
181                 return
182                 
183                 		super.toString() + " | " +
184                 		
185 				               "Id = " +
186 				               String.valueOf(Id) + " | " +
187 				            
188 				               "Type = " +
189 				               String.valueOf(Type) + " | " +
190 				            
191 				               "Location = " +
192 				               String.valueOf(Location) + " | " +
193 				             "";
194                 	
195              }
196 
197              public String toHtmlString() {
198                 return super.toString() +
199             
200             "<b>Id</b> : " +
201             String.valueOf(Id) +
202             " <br/> " +
203             
204             "<b>Type</b> : " +
205             String.valueOf(Type) +
206             " <br/> " +
207             
208             "<b>Location</b> : " +
209             String.valueOf(Location) +
210             " <br/> " +
211              "";
212              }
213 
214              
215              
216              }
217 
218