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                Will set speed of the game.
34                            Corresponding GameBots command is
35                            SETGAMESPEED.
36                        
37               */
38              
39              public class
40              SetGameSpeed extends
41          CommandMessage
42  
43              {
44              
45              /**
46                Creates new instance of command SetGameSpeed.
47                Will set speed of the game.Corresponding GameBots message for this command is
48                SETGAMESPEED.
49                    @param Speed 
50  			Can range from 0.1 to 50. 1 is normal game speed. The
51  			reasonable speeding up is around 10. The game engine stops
52  			catching up at higher values.
53  		
54                */
55               public SetGameSpeed(
56                  double Speed) {
57                      
58                      this.Speed = Speed;
59                  
60                  }
61  
62              
63              		/**
64  		             Creates new instance of command SetGameSpeed.
65  		             Will set speed of the game.Corresponding GameBots message for this command is
66  		             SETGAMESPEED.
67  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
68  		             */
69              		public  SetGameSpeed() {
70              		}
71              	
72  
73              /////// Properties BEGIN
74              
75          /**
76          
77  			Can range from 0.1 to 50. 1 is normal game speed. The
78  			reasonable speeding up is around 10. The game engine stops
79  			catching up at higher values.
80  		 */
81          protected
82           double Speed =
83          	0;
84  
85          
86          /**
87          
88  			Can range from 0.1 to 50. 1 is normal game speed. The
89  			reasonable speeding up is around 10. The game engine stops
90  			catching up at higher values.
91  		 */
92          public
93          double getSpeed() {
94              return
95           Speed;
96          }
97          
98  
99          
100             /**
101         
102 			Can range from 0.1 to 50. 1 is normal game speed. The
103 			reasonable speeding up is around 10. The game engine stops
104 			catching up at higher values.
105 		 */
106         public SetGameSpeed setSpeed(double Speed) {
107             this.Speed = Speed;
108             return this;
109             }
110        
111             /////// Properties END
112 
113             /////// Extra Java code BEGIN
114 
115             	/////// Additional code from xslt BEGIN
116             		
117 
118 
119             	/////// Additional code from xslt END
120 
121 	            /////// Extra Java from XML BEGIN
122             		
123             	/////// Extra Java from XML END
124 
125             /////// Extra Java code END
126 
127             
128 
129             /**
130               * Cloning constructor.
131               */
132              public SetGameSpeed(SetGameSpeed original) {
133                 
134                      this.Speed=original.Speed;
135                 
136              }
137 
138              
139 
140                  
141             public String toString() {
142                 return
143                 
144                     	toMessage();
145                     
146              }
147 
148              public String toHtmlString() {
149                 return super.toString() +
150             
151             "<b>Speed</b> : " +
152             String.valueOf(Speed) +
153             " <br/> " +
154              "";
155              }
156 
157              
158              
159              	 public String toMessage() {
160               		StringBuffer buf = new StringBuffer();
161               		buf.append("SETGAMESPEED");
162               		
163 		    					buf.append(" {Speed " + Speed + "}");
164 		    				
165             		return buf.toString();
166             }
167              
168              }
169 
170