|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.udk.bot.impl.UDKBotController<BOT>
public class UDKBotController<BOT extends UDKBot>
Field Summary | |
---|---|
protected BOT |
bot
Instance of the bot we're controlling. |
protected LogCategory |
user
User log - it's log-level is initially set to Level.ALL . |
static String |
USER_LOG_CATEGORY_ID
Name of the log category of the user log. |
Constructor Summary | |
---|---|
UDKBotController()
|
Method Summary | |
---|---|
void |
botInitialized(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init)
This method is called whenever InitedMessage is received. |
void |
botKilled(BotKilled event)
Called whenever the bot gets killed inside the game. |
void |
botShutdown()
Called whenever the bot is shutdown (has finished) or killed (not in the game but as the instance). |
void |
botSpawned(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init,
Self self)
This method is called only once whenever first batch of information what the bot can see is received. |
IAct |
getAct()
|
BOT |
getBot()
|
Initialize |
getInitializeCommand()
This method is called after handshake with GameBots2004 is over and the GameBots2004 is awaiting the INIT command (Initialize class). |
LogCategory |
getLog()
Returns user logger. |
PasswordReply |
getPassword()
Returns password that should be used to access the GameBots2004 server. |
IVisionWorldView |
getWorldView()
|
void |
initializeController(BOT bot)
Called during the construction of the UDKBot before the GameBots2004 greets the bot even before
IUDKBotController.prepareBot(UDKBot) method. |
void |
prepareBot(BOT bot)
Called during the construction of the UDKBot before the GameBots2004 greets the bot. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USER_LOG_CATEGORY_ID
protected BOT extends UDKBot bot
protected LogCategory user
Level.ALL
.
Constructor Detail |
---|
public UDKBotController()
Method Detail |
---|
public void initializeController(BOT bot)
IUDKBotController
UDKBot
before the GameBots2004 greets the bot even before
IUDKBotController.prepareBot(UDKBot)
method.
NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's initializeController.
initializeController
in interface IUDKBotController<BOT extends UDKBot>
public void prepareBot(BOT bot)
IUDKBotController
UDKBot
before the GameBots2004 greets the bot.
prepareBot
in interface IUDKBotController<BOT extends UDKBot>
public BOT getBot()
public PasswordReply getPassword()
IUDKBotController
Called only if the bot is challenged by the password request.
getPassword
in interface IUDKBotController<BOT extends UDKBot>
public Initialize getInitializeCommand()
IUDKBotController
getInitializeCommand
in interface IUDKBotController<BOT extends UDKBot>
public void botInitialized(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init)
IUDKBotController
InitedMessage
is received. Various agent modules are usable since this
method is called.
botInitialized
in interface IUDKBotController<BOT extends UDKBot>
public void botSpawned(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init, Self self)
IUDKBotController
Note that this method has advantage over the IUDKBotController.botInitialized(GameInfo, ConfigChange, InitedMessage)
that you already have Self
object.
botSpawned
in interface IUDKBotController<BOT extends UDKBot>
public void botKilled(BotKilled event)
IUDKBotController
botKilled
in interface IUDKBotController<BOT extends UDKBot>
public void botShutdown()
IUDKBotController
Use the method to save your work / data collected during the run of the agent.
Pogamut's guarantee that this method is called even if exception happens inside your previous code.
botShutdown
in interface IUDKBotController<BOT extends UDKBot>
public IVisionWorldView getWorldView()
public IAct getAct()
public LogCategory getLog()
bot.getLogger().getCategory(USER_LOG_ID)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |