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 Tries to enter vehicle specified by Id. Note: 35 You have to be in vehicle EntryRadius to enter (default 100 ut units). 36 Response to this command are messages ENTERED and LOCKED. 37 Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead. 38 Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified. 39 40 Corresponding GameBots command is 41 ENTER. 42 43 */ 44 45 public class 46 EnterVehicle extends 47 CommandMessage 48 49 { 50 51 /** 52 Creates new instance of command EnterVehicle. 53 54 Tries to enter vehicle specified by Id. Note: 55 You have to be in vehicle EntryRadius to enter (default 100 ut units). 56 Response to this command are messages ENTERED and LOCKED. 57 Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead. 58 Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified. 59 Corresponding GameBots message for this command is 60 ENTER. 61 @param Id Id of the vehicle we want to enter. 62 */ 63 public EnterVehicle( 64 UnrealId Id) { 65 66 this.Id = Id; 67 68 } 69 70 71 /** 72 Creates new instance of command EnterVehicle. 73 74 Tries to enter vehicle specified by Id. Note: 75 You have to be in vehicle EntryRadius to enter (default 100 ut units). 76 Response to this command are messages ENTERED and LOCKED. 77 Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead. 78 Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified. 79 Corresponding GameBots message for this command is 80 ENTER. 81 <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up! 82 */ 83 public EnterVehicle() { 84 } 85 86 87 /////// Properties BEGIN 88 89 /** 90 Id of the vehicle we want to enter. */ 91 protected 92 UnrealId Id = 93 null; 94 95 96 /** 97 Id of the vehicle we want to enter. */ 98 public 99 UnrealId getId() { 100 return 101 Id; 102 } 103 104 105 106 /** 107 Id of the vehicle we want to enter. */ 108 public EnterVehicle setId(UnrealId Id) { 109 this.Id = Id; 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 EnterVehicle(EnterVehicle original) { 135 136 this.Id=original.Id; 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>Id</b> : " + 154 String.valueOf(Id) + 155 " <br/> " + 156 ""; 157 } 158 159 160 161 public String toMessage() { 162 StringBuffer buf = new StringBuffer(); 163 buf.append("ENTER"); 164 165 if (Id != null) { 166 buf.append(" {Id " + Id.getStringId() + "}"); 167 } 168 169 return buf.toString(); 170 } 171 172 } 173 174