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  		Will pause/unpause the game. The game can be paused just if
35  		bAllowPause = true in GameBotsUDK.ini (different settings for bots
36  		and server possible).
37  	
38                            Corresponding GameBots command is
39                            PAUSE.
40                        
41               */
42              
43              public class
44              Pause extends
45          CommandMessage
46  
47              {
48              
49              /**
50                Creates new instance of command Pause.
51                
52  		Will pause/unpause the game. The game can be paused just if
53  		bAllowPause = true in GameBotsUDK.ini (different settings for bots
54  		and server possible).
55  	Corresponding GameBots message for this command is
56                PAUSE.
57                    @param PauseBots 
58  			Iif true only bots will be paused – players and spectators
59  			will move freely.
60  		
61                    @param PauseAll 
62  			Everyone in the game will be paused if set to true. To
63  			unpause send PAUSE command with PauseAll set to false.
64  		
65                */
66               public Pause(
67                  boolean PauseBots,  boolean PauseAll) {
68                      
69                      this.PauseBots = PauseBots;
70                  
71                      this.PauseAll = PauseAll;
72                  
73                  }
74  
75              
76              		/**
77  		             Creates new instance of command Pause.
78  		             
79  		Will pause/unpause the game. The game can be paused just if
80  		bAllowPause = true in GameBotsUDK.ini (different settings for bots
81  		and server possible).
82  	Corresponding GameBots message for this command is
83  		             PAUSE.
84  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
85  		             */
86              		public  Pause() {
87              		}
88              	
89  
90              /////// Properties BEGIN
91              
92          /**
93          
94  			Iif true only bots will be paused – players and spectators
95  			will move freely.
96  		 */
97          protected
98           boolean PauseBots =
99          	false;
100 
101         
102         /**
103         
104 			Iif true only bots will be paused – players and spectators
105 			will move freely.
106 		 */
107         public
108         boolean isPauseBots() {
109             return
110          PauseBots;
111         }
112         
113 
114         
115             /**
116         
117 			Iif true only bots will be paused – players and spectators
118 			will move freely.
119 		 */
120         public Pause setPauseBots(boolean PauseBots) {
121             this.PauseBots = PauseBots;
122             return this;
123             }
124        
125         /**
126         
127 			Everyone in the game will be paused if set to true. To
128 			unpause send PAUSE command with PauseAll set to false.
129 		 */
130         protected
131          boolean PauseAll =
132         	false;
133 
134         
135         /**
136         
137 			Everyone in the game will be paused if set to true. To
138 			unpause send PAUSE command with PauseAll set to false.
139 		 */
140         public
141         boolean isPauseAll() {
142             return
143          PauseAll;
144         }
145         
146 
147         
148             /**
149         
150 			Everyone in the game will be paused if set to true. To
151 			unpause send PAUSE command with PauseAll set to false.
152 		 */
153         public Pause setPauseAll(boolean PauseAll) {
154             this.PauseAll = PauseAll;
155             return this;
156             }
157        
158             /////// Properties END
159 
160             /////// Extra Java code BEGIN
161 
162             	/////// Additional code from xslt BEGIN
163             		
164 
165 
166             	/////// Additional code from xslt END
167 
168 	            /////// Extra Java from XML BEGIN
169             		
170             	/////// Extra Java from XML END
171 
172             /////// Extra Java code END
173 
174             
175 
176             /**
177               * Cloning constructor.
178               */
179              public Pause(Pause original) {
180                 
181                      this.PauseBots=original.PauseBots;
182                 
183                      this.PauseAll=original.PauseAll;
184                 
185              }
186 
187              
188 
189                  
190             public String toString() {
191                 return
192                 
193                     	toMessage();
194                     
195              }
196 
197              public String toHtmlString() {
198                 return super.toString() +
199             
200             "<b>PauseBots</b> : " +
201             String.valueOf(PauseBots) +
202             " <br/> " +
203             
204             "<b>PauseAll</b> : " +
205             String.valueOf(PauseAll) +
206             " <br/> " +
207              "";
208              }
209 
210              
211              
212              	 public String toMessage() {
213               		StringBuffer buf = new StringBuffer();
214               		buf.append("PAUSE");
215               		
216 		    					buf.append(" {PauseBots " + PauseBots + "}");
217 		    				
218 		    					buf.append(" {PauseAll " + PauseAll + "}");
219 		    				
220             		return buf.toString();
221             }
222              
223              }
224 
225