View Javadoc

1   
2               /**
3               IMPORTANT !!!
4   
5               DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands 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.gbcommands;
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                Causes bot to jump.
34                            Corresponding GameBots command is
35                            JUMP.
36                        
37               */
38              
39              public class
40              Jump extends
41          CommandMessage
42  
43              {
44              
45              /**
46                Creates new instance of command Jump.
47                Causes bot to jump.Corresponding GameBots message for this command is
48                JUMP.
49                    @param DoubleJump 
50  			If set to True will cause the bot to perform double jump.
51  		
52                    @param Delay 
53  			After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. If not specified and DoubleJump is true, 0.5 seconds will be used.
54  		
55                    @param Force 
56  			Force vector specifying how big the jump should be. Can't be set more than bot JumpZ variable for single jump and 2 * JumpZ variable for doube jump. Default value of JumpZ is 420 ut units (for UDK). If not specified, JumpZ value will be used. If not specified and DoubleJump is true, 2 * JumpZ value will be used.
57  		
58                */
59               public Jump(
60                  boolean DoubleJump,  double Delay,  double Force) {
61                      
62                      this.DoubleJump = DoubleJump;
63                  
64                      this.Delay = Delay;
65                  
66                      this.Force = Force;
67                  
68                  }
69  
70              
71              		/**
72  		             Creates new instance of command Jump.
73  		             Causes bot to jump.Corresponding GameBots message for this command is
74  		             JUMP.
75  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
76  		             */
77              		public  Jump() {
78              		}
79              	
80  
81              /////// Properties BEGIN
82              
83          /**
84          
85  			If set to True will cause the bot to perform double jump.
86  		 */
87          protected
88           boolean DoubleJump =
89          	false;
90  
91          
92          /**
93          
94  			If set to True will cause the bot to perform double jump.
95  		 */
96          public
97          boolean isDoubleJump() {
98              return
99           DoubleJump;
100         }
101         
102 
103         
104             /**
105         
106 			If set to True will cause the bot to perform double jump.
107 		 */
108         public Jump setDoubleJump(boolean DoubleJump) {
109             this.DoubleJump = DoubleJump;
110             return this;
111             }
112        
113         /**
114         
115 			After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. If not specified and DoubleJump is true, 0.5 seconds will be used.
116 		 */
117         protected
118          double Delay =
119         	0;
120 
121         
122         /**
123         
124 			After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. If not specified and DoubleJump is true, 0.5 seconds will be used.
125 		 */
126         public
127         double getDelay() {
128             return
129          Delay;
130         }
131         
132 
133         
134             /**
135         
136 			After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. If not specified and DoubleJump is true, 0.5 seconds will be used.
137 		 */
138         public Jump setDelay(double Delay) {
139             this.Delay = Delay;
140             return this;
141             }
142        
143         /**
144         
145 			Force vector specifying how big the jump should be. Can't be set more than bot JumpZ variable for single jump and 2 * JumpZ variable for doube jump. Default value of JumpZ is 420 ut units (for UDK). If not specified, JumpZ value will be used. If not specified and DoubleJump is true, 2 * JumpZ value will be used.
146 		 */
147         protected
148          double Force =
149         	0;
150 
151         
152         /**
153         
154 			Force vector specifying how big the jump should be. Can't be set more than bot JumpZ variable for single jump and 2 * JumpZ variable for doube jump. Default value of JumpZ is 420 ut units (for UDK). If not specified, JumpZ value will be used. If not specified and DoubleJump is true, 2 * JumpZ value will be used.
155 		 */
156         public
157         double getForce() {
158             return
159          Force;
160         }
161         
162 
163         
164             /**
165         
166 			Force vector specifying how big the jump should be. Can't be set more than bot JumpZ variable for single jump and 2 * JumpZ variable for doube jump. Default value of JumpZ is 420 ut units (for UDK). If not specified, JumpZ value will be used. If not specified and DoubleJump is true, 2 * JumpZ value will be used.
167 		 */
168         public Jump setForce(double Force) {
169             this.Force = Force;
170             return this;
171             }
172        
173             /////// Properties END
174 
175             /////// Extra Java code BEGIN
176 
177             	/////// Additional code from xslt BEGIN
178             		
179 
180 
181             	/////// Additional code from xslt END
182 
183 	            /////// Extra Java from XML BEGIN
184             		
185             	/////// Extra Java from XML END
186 
187             /////// Extra Java code END
188 
189             
190 
191             /**
192               * Cloning constructor.
193               */
194              public Jump(Jump original) {
195                 
196                      this.DoubleJump=original.DoubleJump;
197                 
198                      this.Delay=original.Delay;
199                 
200                      this.Force=original.Force;
201                 
202              }
203 
204              
205 
206                  
207             public String toString() {
208                 return
209                 
210                     	toMessage();
211                     
212              }
213 
214              public String toHtmlString() {
215                 return super.toString() +
216             
217             "<b>DoubleJump</b> : " +
218             String.valueOf(DoubleJump) +
219             " <br/> " +
220             
221             "<b>Delay</b> : " +
222             String.valueOf(Delay) +
223             " <br/> " +
224             
225             "<b>Force</b> : " +
226             String.valueOf(Force) +
227             " <br/> " +
228              "";
229              }
230 
231              
232              
233              	 public String toMessage() {
234               		StringBuffer buf = new StringBuffer();
235               		buf.append("JUMP");
236               		
237 		    					buf.append(" {DoubleJump " + DoubleJump + "}");
238 		    				
239 		    					buf.append(" {Delay " + Delay + "}");
240 		    				
241 		    					buf.append(" {Force " + Force + "}");
242 		    				
243             		return buf.toString();
244             }
245              
246              }
247 
248