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                Causes bot to perform usage of a specified trigger. Response to this action is carried by the TRGUSED (TriggerUsed) info message 
34                            Corresponding GameBots command is
35                            USETRG.
36                        
37               */
38              
39              public class
40              UseTrigger extends
41          CommandMessage
42  
43              {
44              
45              /**
46                Creates new instance of command UseTrigger.
47                Causes bot to perform usage of a specified trigger. Response to this action is carried by the TRGUSED (TriggerUsed) info message Corresponding GameBots message for this command is
48                USETRG.
49                    @param Target 
50  			The trigger object to use.
51  		
52                */
53               public UseTrigger(
54                  UnrealId Target) {
55                      
56                      this.Target = Target;
57                  
58                  }
59  
60              
61              		/**
62  		             Creates new instance of command UseTrigger.
63  		             Causes bot to perform usage of a specified trigger. Response to this action is carried by the TRGUSED (TriggerUsed) info message Corresponding GameBots message for this command is
64  		             USETRG.
65  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
66  		             */
67              		public  UseTrigger() {
68              		}
69              	
70  
71              /////// Properties BEGIN
72              
73          /**
74          
75  			The trigger object to use.
76  		 */
77          protected
78           UnrealId Target =
79          	null;
80  
81          
82          /**
83          
84  			The trigger object to use.
85  		 */
86          public
87          UnrealId getTarget() {
88              return
89           Target;
90          }
91          
92  
93          
94              /**
95          
96  			The trigger object to use.
97  		 */
98          public UseTrigger setTarget(UnrealId Target) {
99              this.Target = Target;
100             return this;
101             }
102        
103             /////// Properties END
104 
105             /////// Extra Java code BEGIN
106 
107             	/////// Additional code from xslt BEGIN
108             		
109 
110 
111             	/////// Additional code from xslt END
112 
113 	            /////// Extra Java from XML BEGIN
114             		
115             	/////// Extra Java from XML END
116 
117             /////// Extra Java code END
118 
119             
120 
121             /**
122               * Cloning constructor.
123               */
124              public UseTrigger(UseTrigger original) {
125                 
126                      this.Target=original.Target;
127                 
128              }
129 
130              
131 
132                  
133             public String toString() {
134                 return
135                 
136                     	toMessage();
137                     
138              }
139 
140              public String toHtmlString() {
141                 return super.toString() +
142             
143             "<b>Target</b> : " +
144             String.valueOf(Target) +
145             " <br/> " +
146              "";
147              }
148 
149              
150              
151              	 public String toMessage() {
152               		StringBuffer buf = new StringBuffer();
153               		buf.append("USETRG");
154               		
155 		    					if (Target != null) {
156 		    						buf.append(" {Target " + Target.getStringId() + "}");
157 		    					}
158 		    				
159             		return buf.toString();
160             }
161              
162              }
163 
164