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. This message represents case, where bot
35  		stands at the edge of cliff or somewhere the bot can fall. If
36  		the bot has ran, it is already falling. When the bot is walking
37  		he can't fall from the cliff, so after receiving this message, he
38  		is standing at the edge of the cliff.
39  	
40                            Corresponding GameBots message is
41                            FAL.
42                        
43               */
44              
45              public class
46              FallEdge
47                      extends GBEvent
48                  
49  	            	implements IWorldEvent, IWorldChangeEvent
50  
51              {
52              
53              /**
54                Creates new instance of command FallEdge.
55                
56  		Asynchronous message. This message represents case, where bot
57  		stands at the edge of cliff or somewhere the bot can fall. If
58  		the bot has ran, it is already falling. When the bot is walking
59  		he can't fall from the cliff, so after receiving this message, he
60  		is standing at the edge of the cliff.
61  	Corresponding GameBots message for this command is
62                .
63                    @param Fell 
64  			Flag for falling, if true, then the bot is already falling.
65  		
66                    @param Location Current location of the bot.
67                */
68               public FallEdge(
69                  boolean Fell,  Location Location) {
70                      
71                      this.Fell = Fell;
72                  
73                      this.Location = Location;
74                  
75                  }
76  
77              
78      	/** Example how the message looks like - used during parser tests. */
79      	public static final String PROTOTYPE =
80      		"FAL {Fell False} {Location 0,0,0}";
81      
82  
83              /////// Properties BEGIN
84              
85          /**
86          
87  			Flag for falling, if true, then the bot is already falling.
88  		 */
89          protected
90           boolean Fell =
91          	false;
92  
93          
94          /**
95          
96  			Flag for falling, if true, then the bot is already falling.
97  		 */
98          public
99          boolean isFell() {
100             return
101          Fell;
102         }
103         
104 
105         
106         /**
107         Current location of the bot. */
108         protected
109          Location Location =
110         	null;
111 
112         
113         /**
114         Current location of the bot. */
115         public
116         Location getLocation() {
117             return
118          Location;
119         }
120         
121 
122         
123             /////// Properties END
124 
125             /////// Extra Java code BEGIN
126 
127             	/////// Additional code from xslt BEGIN
128             		
129        					public long getSimTime() {
130        						// NOT IMPLEMENTED FOR UDK
131        						return 0;
132        					}
133             		
134 
135 
136             	/////// Additional code from xslt END
137 
138 	            /////// Extra Java from XML BEGIN
139             		
140             	/////// Extra Java from XML END
141 
142             /////// Extra Java code END
143 
144             
145 
146             /**
147               * Cloning constructor.
148               */
149              public FallEdge(FallEdge original) {
150                 
151                      this.Fell=original.Fell;
152                 
153                      this.Location=original.Location;
154                 
155              }
156 
157              
158                  /**
159                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
160                   */
161 	             public FallEdge() {
162 	             }
163              
164 
165                  
166             public String toString() {
167                 return
168                 
169                 		super.toString() + " | " +
170                 		
171 				               "Fell = " +
172 				               String.valueOf(Fell) + " | " +
173 				            
174 				               "Location = " +
175 				               String.valueOf(Location) + " | " +
176 				             "";
177                 	
178              }
179 
180              public String toHtmlString() {
181                 return super.toString() +
182             
183             "<b>Fell</b> : " +
184             String.valueOf(Fell) +
185             " <br/> " +
186             
187             "<b>Location</b> : " +
188             String.valueOf(Location) +
189             " <br/> " +
190              "";
191              }
192 
193              
194              
195              }
196 
197