|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot> cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors
public class ItemDescriptors
Sensory module that provides mapping between ItemType
and ItemDescriptor
providing
an easy way to obtain item descriptors for various items in UT2004.
Additionally it provides ammo->weapon mapping via getWeaponForAmmo(ItemType)
.
It is designed to be initialized inside IUT2004BotController.prepareBot(UT2004Bot)
method call
and may be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)
is called.
Field Summary |
---|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
---|
worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
ItemDescriptors(UT2004Bot bot)
Constructor. |
|
ItemDescriptors(UT2004Bot bot,
LogCategory moduleLog)
|
Method Summary | |
---|---|
protected void |
cleanUp()
Hook where to perform clean up of data structures of the module. |
ItemDescriptor |
getDescriptor(ItemType itemType)
Returns the descriptor for the given 'itemType'. |
ItemDescriptor |
getDescriptor(java.lang.String inventoryType)
Returns the descriptor for the given 'inventoryType'. |
ItemType |
getWeaponForAmmo(ItemType ammoType)
Returns a weapon type for the given 'ammoType'. |
boolean |
hasDescriptor(ItemType itemType)
Tells whether the descriptor for given 'itemType' exists. |
boolean |
hasDescriptor(java.lang.String inventoryType)
Tells whether the descriptor for given 'inventoryType' exists. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ItemDescriptors(UT2004Bot bot)
bot
- owner of the modulepublic ItemDescriptors(UT2004Bot bot, LogCategory moduleLog)
Method Detail |
---|
public ItemType getWeaponForAmmo(ItemType ammoType)
ammoType
-
public boolean hasDescriptor(ItemType itemType)
itemType
-
public ItemDescriptor getDescriptor(ItemType itemType)
itemType
-
public boolean hasDescriptor(java.lang.String inventoryType)
itemType
-
public ItemDescriptor getDescriptor(java.lang.String inventoryType)
itemType
-
protected void cleanUp()
AgentModule
Called from AgentModule.stop()
, AgentModule.kill()
, AgentModule.reset()
.
cleanUp
in class AgentModule<UT2004Bot>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |