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                
34  		Causes the bot to dodge (do jump) to supported direction.
35  	
36                            Corresponding GameBots command is
37                            DODGE.
38                        
39               */
40              
41              public class
42              Dodge extends
43          CommandMessage
44  
45              {
46              
47              /**
48                Creates new instance of command Dodge.
49                
50  		Causes the bot to dodge (do jump) to supported direction.
51  	Corresponding GameBots message for this command is
52                DODGE.
53                    @param Direction 
54  			Relative vector, will be normalized. The direction of the
55  			dodge will be added to current bot rotation.
56  		
57                */
58               public Dodge(
59                  Vector3d Direction) {
60                      
61                      this.Direction = Direction;
62                  
63                  }
64  
65              
66              		/**
67  		             Creates new instance of command Dodge.
68  		             
69  		Causes the bot to dodge (do jump) to supported direction.
70  	Corresponding GameBots message for this command is
71  		             DODGE.
72  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
73  		             */
74              		public  Dodge() {
75              		}
76              	
77  
78              /////// Properties BEGIN
79              
80          /**
81          
82  			Relative vector, will be normalized. The direction of the
83  			dodge will be added to current bot rotation.
84  		 */
85          protected
86           Vector3d Direction =
87          	null;
88  
89          
90          /**
91          
92  			Relative vector, will be normalized. The direction of the
93  			dodge will be added to current bot rotation.
94  		 */
95          public
96          Vector3d getDirection() {
97              return
98           Direction;
99          }
100         
101 
102         
103             /**
104         
105 			Relative vector, will be normalized. The direction of the
106 			dodge will be added to current bot rotation.
107 		 */
108         public Dodge setDirection(Vector3d Direction) {
109             this.Direction = Direction;
110             return this;
111             }
112        
113             /////// Properties END
114 
115             /////// Extra Java code BEGIN
116 
117             	/////// Additional code from xslt BEGIN
118             		
119 
120 
121             	/////// Additional code from xslt END
122 
123 	            /////// Extra Java from XML BEGIN
124             		
125             	/////// Extra Java from XML END
126 
127             /////// Extra Java code END
128 
129             
130 
131             /**
132               * Cloning constructor.
133               */
134              public Dodge(Dodge original) {
135                 
136                      this.Direction=original.Direction;
137                 
138              }
139 
140              
141 
142                  
143             public String toString() {
144                 return
145                 
146                     	toMessage();
147                     
148              }
149 
150              public String toHtmlString() {
151                 return super.toString() +
152             
153             "<b>Direction</b> : " +
154             String.valueOf(Direction) +
155             " <br/> " +
156              "";
157              }
158 
159              
160              
161              	 public String toMessage() {
162               		StringBuffer buf = new StringBuffer();
163               		buf.append("DODGE");
164               		
165 		    					if (Direction != null) {
166 		    						buf.append(" {Direction " +
167 		    							Direction.getX() + "," +
168 		    							Direction.getY() + "," +
169 		    							Direction.getZ() + "}");
170 		    					}
171 		    				
172             		return buf.toString();
173             }
174              
175              }
176 
177