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. You hear someone pick up an object from
35  		the ground.
36  	
37                            Corresponding GameBots message is
38                            HRP.
39                        
40               */
41              
42              public class
43              HearPickup
44                      extends GBEvent
45                  
46  	            	implements IWorldEvent, IWorldChangeEvent
47  
48              {
49              
50              /**
51                Creates new instance of command HearPickup.
52                
53  		Asynchronous message. You hear someone pick up an object from
54  		the ground.
55  	Corresponding GameBots message for this command is
56                .
57                    @param Source Unique Id of an object picked up.
58                    @param Type Class of the picked up actor.
59                    @param Rotation 
60  			How should bot rotate if it would like to be in the
61  			direction of the pickuped actor
62  		
63                */
64               public HearPickup(
65                  UnrealId Source,  String Type,  Rotation Rotation) {
66                      
67                      this.Source = Source;
68                  
69                      this.Type = Type;
70                  
71                      this.Rotation = Rotation;
72                  
73                  }
74  
75              
76      	/** Example how the message looks like - used during parser tests. */
77      	public static final String PROTOTYPE =
78      		"HRP {Source unreal_id} {Type text} {Rotation 0,0,0}";
79      
80  
81              /////// Properties BEGIN
82              
83          /**
84          Unique Id of an object picked up. */
85          protected
86           UnrealId Source =
87          	null;
88  
89          
90          /**
91          Unique Id of an object picked up. */
92          public
93          UnrealId getSource() {
94              return
95           Source;
96          }
97          
98  
99          
100         /**
101         Class of the picked up actor. */
102         protected
103          String Type =
104         	null;
105 
106         
107         /**
108         Class of the picked up actor. */
109         public
110         String getType() {
111             return
112          Type;
113         }
114         
115 
116         
117         /**
118         
119 			How should bot rotate if it would like to be in the
120 			direction of the pickuped actor
121 		 */
122         protected
123          Rotation Rotation =
124         	null;
125 
126         
127         /**
128         
129 			How should bot rotate if it would like to be in the
130 			direction of the pickuped actor
131 		 */
132         public
133         Rotation getRotation() {
134             return
135          Rotation;
136         }
137         
138 
139         
140             /////// Properties END
141 
142             /////// Extra Java code BEGIN
143 
144             	/////// Additional code from xslt BEGIN
145             		
146        					public long getSimTime() {
147        						// NOT IMPLEMENTED FOR UDK
148        						return 0;
149        					}
150             		
151 
152 
153             	/////// Additional code from xslt END
154 
155 	            /////// Extra Java from XML BEGIN
156             		
157             	/////// Extra Java from XML END
158 
159             /////// Extra Java code END
160 
161             
162 
163             /**
164               * Cloning constructor.
165               */
166              public HearPickup(HearPickup original) {
167                 
168                      this.Source=original.Source;
169                 
170                      this.Type=original.Type;
171                 
172                      this.Rotation=original.Rotation;
173                 
174              }
175 
176              
177                  /**
178                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
179                   */
180 	             public HearPickup() {
181 	             }
182              
183 
184                  
185             public String toString() {
186                 return
187                 
188                 		super.toString() + " | " +
189                 		
190 				               "Source = " +
191 				               String.valueOf(Source) + " | " +
192 				            
193 				               "Type = " +
194 				               String.valueOf(Type) + " | " +
195 				            
196 				               "Rotation = " +
197 				               String.valueOf(Rotation) + " | " +
198 				             "";
199                 	
200              }
201 
202              public String toHtmlString() {
203                 return super.toString() +
204             
205             "<b>Source</b> : " +
206             String.valueOf(Source) +
207             " <br/> " +
208             
209             "<b>Type</b> : " +
210             String.valueOf(Type) +
211             " <br/> " +
212             
213             "<b>Rotation</b> : " +
214             String.valueOf(Rotation) +
215             " <br/> " +
216              "";
217              }
218 
219              
220              
221              }
222 
223