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 THAT FILE INSTEAD OF THIS ONE.
7            
8            Use Ant task process-gb-messages after that to generate .java files again.
9            
10           IMPORTANT END !!!
11          */
12   	package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13   		/**
14   		 * Representation of the GameBots2004 command SETWALK.
15   		 *
16   		 * 
17  		Set whether you are walking or running (default is run).
18  	
19           */
20   	public class SetWalk 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Walk False}  {WalkAnim text}  {RunAnim text} ";
28      
29  		/**
30  		 * Creates new instance of command SetWalk.
31  		 * 
32  		Set whether you are walking or running (default is run).
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * SETWALK.
36  		 *
37  		 * 
38  		 *    @param Walk 
39  			True or false to enable/disable bot walking.
40  		
41  		 *    @param WalkAnim 
42  			Change name of walking animation. Supported in UE2.
43  		
44  		 *    @param RunAnim 
45  			Change name of running animation. Supported in UE2
46  		
47  		 */
48  		public SetWalk(
49  			Boolean Walk,  String WalkAnim,  String RunAnim
50  		) {
51  			
52  				this.Walk = Walk;
53              
54  				this.WalkAnim = WalkAnim;
55              
56  				this.RunAnim = RunAnim;
57              
58  		}
59  
60  		
61  			/**
62  			 * Creates new instance of command SetWalk.
63  			 * 
64  		Set whether you are walking or running (default is run).
65  	
66  			 * Corresponding GameBots message for this command is
67  			 * SETWALK.
68  			 * <p></p>
69  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
70  		     */
71  		    public SetWalk() {
72  		    }
73  			
74  		
75  		/**
76  		 * Cloning constructor.
77  		 *
78  		 * @param original
79  		 */
80  		public SetWalk(SetWalk original) {
81  		   
82  		        this.Walk = original.Walk;
83  		   
84  		        this.WalkAnim = original.WalkAnim;
85  		   
86  		        this.RunAnim = original.RunAnim;
87  		   
88  		}
89      
90  	        /**
91  	        
92  			True or false to enable/disable bot walking.
93  		 
94  	        */
95  	        protected
96  	         Boolean Walk =
97  	       	
98  	        		null
99  	        	;
100 	
101 	        
102 	        
103  		/**
104          * 
105 			True or false to enable/disable bot walking.
106 		 
107          */
108         public Boolean isWalk()
109  	
110 	        {
111 	            return
112 	        	 Walk;
113 	        }
114 	        
115 	        
116 	        
117  		
118  		/**
119          * 
120 			True or false to enable/disable bot walking.
121 		 
122          */
123         public SetWalk 
124         setWalk(Boolean Walk)
125  	
126 			{
127 				this.Walk = Walk;
128 				return this;
129 			}
130 		
131 	        /**
132 	        
133 			Change name of walking animation. Supported in UE2.
134 		 
135 	        */
136 	        protected
137 	         String WalkAnim =
138 	       	
139 	        		null
140 	        	;
141 	
142 	        
143 	        
144  		/**
145          * 
146 			Change name of walking animation. Supported in UE2.
147 		 
148          */
149         public String getWalkAnim()
150  	
151 	        {
152 	            return
153 	        	 WalkAnim;
154 	        }
155 	        
156 	        
157 	        
158  		
159  		/**
160          * 
161 			Change name of walking animation. Supported in UE2.
162 		 
163          */
164         public SetWalk 
165         setWalkAnim(String WalkAnim)
166  	
167 			{
168 				this.WalkAnim = WalkAnim;
169 				return this;
170 			}
171 		
172 	        /**
173 	        
174 			Change name of running animation. Supported in UE2
175 		 
176 	        */
177 	        protected
178 	         String RunAnim =
179 	       	
180 	        		null
181 	        	;
182 	
183 	        
184 	        
185  		/**
186          * 
187 			Change name of running animation. Supported in UE2
188 		 
189          */
190         public String getRunAnim()
191  	
192 	        {
193 	            return
194 	        	 RunAnim;
195 	        }
196 	        
197 	        
198 	        
199  		
200  		/**
201          * 
202 			Change name of running animation. Supported in UE2
203 		 
204          */
205         public SetWalk 
206         setRunAnim(String RunAnim)
207  	
208 			{
209 				this.RunAnim = RunAnim;
210 				return this;
211 			}
212 		
213  	    public String toString() {
214             return toMessage();
215         }
216  	
217  		public String toHtmlString() {
218 			return super.toString() + "[<br/>" +
219             	
220             	"<b>Walk</b> = " +
221             	String.valueOf(isWalk()
222  	) +
223             	" <br/> " +
224             	
225             	"<b>WalkAnim</b> = " +
226             	String.valueOf(getWalkAnim()
227  	) +
228             	" <br/> " +
229             	
230             	"<b>RunAnim</b> = " +
231             	String.valueOf(getRunAnim()
232  	) +
233             	" <br/> " +
234             	 
235             	"<br/>]"
236             ;
237 		}
238  	
239 		public String toMessage() {
240      		StringBuffer buf = new StringBuffer();
241      		buf.append("SETWALK");
242      		
243 						if (Walk != null) {
244 							buf.append(" {Walk " + Walk + "}");
245 						}
246 					
247 						if (WalkAnim != null) {
248 							buf.append(" {WalkAnim " + WalkAnim + "}");
249 						}
250 					
251 						if (RunAnim != null) {
252 							buf.append(" {RunAnim " + RunAnim + "}");
253 						}
254 					
255    			return buf.toString();
256    		}
257  	
258  		// --- Extra Java from XML BEGIN (extra/code/java)
259         	
260 		// --- Extra Java from XML END (extra/code/java)
261  	
262 	        }
263