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 ACT.
15   		 *
16   		 * 
17  		Will trigger some of the native animations.
18  	
19           */
20   	public class PlayAnimation 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Name text}  {Loop False} ";
28      
29  		/**
30  		 * Creates new instance of command PlayAnimation.
31  		 * 
32  		Will trigger some of the native animations.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * ACT.
36  		 *
37  		 * 
38  		 *    @param Name Name of the animation. Possible animations: gesture_beckon, gesture_cheer, gesture_halt, gesture_point, Gesture_Taunt01, PThrust, AssSmack, ThroatCut, Specific_1, Gesture_Taunt02, Idle_Character02, Idle_Character03, Gesture_Taunt03.
39  		 *    @param Loop When true the animation will be played in loop. Supported un GameBotsUE2.
40  		 */
41  		public PlayAnimation(
42  			String Name,  Boolean Loop
43  		) {
44  			
45  				this.Name = Name;
46              
47  				this.Loop = Loop;
48              
49  		}
50  
51  		
52  			/**
53  			 * Creates new instance of command PlayAnimation.
54  			 * 
55  		Will trigger some of the native animations.
56  	
57  			 * Corresponding GameBots message for this command is
58  			 * ACT.
59  			 * <p></p>
60  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
61  		     */
62  		    public PlayAnimation() {
63  		    }
64  			
65  		
66  		/**
67  		 * Cloning constructor.
68  		 *
69  		 * @param original
70  		 */
71  		public PlayAnimation(PlayAnimation original) {
72  		   
73  		        this.Name = original.Name;
74  		   
75  		        this.Loop = original.Loop;
76  		   
77  		}
78      
79  	        /**
80  	        Name of the animation. Possible animations: gesture_beckon, gesture_cheer, gesture_halt, gesture_point, Gesture_Taunt01, PThrust, AssSmack, ThroatCut, Specific_1, Gesture_Taunt02, Idle_Character02, Idle_Character03, Gesture_Taunt03. 
81  	        */
82  	        protected
83  	         String Name =
84  	       	
85  	        		null
86  	        	;
87  	
88  	        
89  	        
90   		/**
91           * Name of the animation. Possible animations: gesture_beckon, gesture_cheer, gesture_halt, gesture_point, Gesture_Taunt01, PThrust, AssSmack, ThroatCut, Specific_1, Gesture_Taunt02, Idle_Character02, Idle_Character03, Gesture_Taunt03. 
92           */
93          public String getName()
94   	
95  	        {
96  	            return
97  	        	 Name;
98  	        }
99  	        
100 	        
101 	        
102  		
103  		/**
104          * Name of the animation. Possible animations: gesture_beckon, gesture_cheer, gesture_halt, gesture_point, Gesture_Taunt01, PThrust, AssSmack, ThroatCut, Specific_1, Gesture_Taunt02, Idle_Character02, Idle_Character03, Gesture_Taunt03. 
105          */
106         public PlayAnimation 
107         setName(String Name)
108  	
109 			{
110 				this.Name = Name;
111 				return this;
112 			}
113 		
114 	        /**
115 	        When true the animation will be played in loop. Supported un GameBotsUE2. 
116 	        */
117 	        protected
118 	         Boolean Loop =
119 	       	
120 	        		null
121 	        	;
122 	
123 	        
124 	        
125  		/**
126          * When true the animation will be played in loop. Supported un GameBotsUE2. 
127          */
128         public Boolean isLoop()
129  	
130 	        {
131 	            return
132 	        	 Loop;
133 	        }
134 	        
135 	        
136 	        
137  		
138  		/**
139          * When true the animation will be played in loop. Supported un GameBotsUE2. 
140          */
141         public PlayAnimation 
142         setLoop(Boolean Loop)
143  	
144 			{
145 				this.Loop = Loop;
146 				return this;
147 			}
148 		
149  	    public String toString() {
150             return toMessage();
151         }
152  	
153  		public String toHtmlString() {
154 			return super.toString() + "[<br/>" +
155             	
156             	"<b>Name</b> = " +
157             	String.valueOf(getName()
158  	) +
159             	" <br/> " +
160             	
161             	"<b>Loop</b> = " +
162             	String.valueOf(isLoop()
163  	) +
164             	" <br/> " +
165             	 
166             	"<br/>]"
167             ;
168 		}
169  	
170 		public String toMessage() {
171      		StringBuffer buf = new StringBuffer();
172      		buf.append("ACT");
173      		
174 						if (Name != null) {
175 							buf.append(" {Name " + Name + "}");
176 						}
177 					
178 						if (Loop != null) {
179 							buf.append(" {Loop " + Loop + "}");
180 						}
181 					
182    			return buf.toString();
183    		}
184  	
185  		// --- Extra Java from XML BEGIN (extra/code/java)
186         	
187 		// --- Extra Java from XML END (extra/code/java)
188  	
189 	        }
190