|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
cz.cuni.amis.pogamut.ut2004.observer.impl.AbstractUT2004Observer<UT2004WorldView,cz.cuni.amis.pogamut.base.communication.command.IAct>
cz.cuni.amis.pogamut.ut2004.observer.impl.UT2004Observer
cz.cuni.amis.pogamut.ut2004.examples.botobserver.BotObserver
public class BotObserver
This simple example will show you how to use Observers. Observers are very nice as that can collect information about arbitrary bots running in UT2004 game. E.g. you can sense on SELF message of the bot, what it can see, whether it is getting damaged, etc...
| Field Summary |
|---|
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent |
|---|
events, INTROSPECTION_ROOT_NAME, log, LOG_CATEGORY_NAME |
| Constructor Summary | |
|---|---|
BotObserver(UT2004AgentParameters params,
cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger agentLogger,
UT2004WorldView worldView,
cz.cuni.amis.pogamut.base.communication.command.IAct act)
|
|
| Method Summary | |
|---|---|
BotObserverParams |
getParams()
We're going to instantiate BotObserver only with BotObserverParams (see constructor that enforces that). |
static void |
main(String[] args)
|
void |
playerEvent(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Player> event)
|
void |
selfEvent(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Self> event)
|
static void |
startObserver()
In case you starting this observer manually, use this method. |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.observer.impl.AbstractUT2004Observer |
|---|
createPasswordReply, getPasswordReply, getWorldView, killAgent, readyCommandRequested, reset, resetAgent, setPassword, startAgent, startPausedAgent, stopAgent |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent |
|---|
getAct |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent |
|---|
addDependency, addDependency, addDependency, addJMXComponents, awaitState, awaitState, componentFatalError, componentStarted, componentStarted, componentStopped, componentStopping, createAgentJMX, createIntrospection, equals, getComponentId, getEventBus, getIntrospection, getJMX, getLog, getLogger, getName, getState, hashCode, inState, kill, notInState, pause, pauseAgent, preKillAgent, preStopAgent, resetEvent, resume, resumeAgent, setState, start, startPaused, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IGhostAgent |
|---|
getAct |
| Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent |
|---|
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop |
| Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponentAware |
|---|
getEventBus |
| Constructor Detail |
|---|
@Inject
public BotObserver(UT2004AgentParameters params,
cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger agentLogger,
UT2004WorldView worldView,
cz.cuni.amis.pogamut.base.communication.command.IAct act)
| Method Detail |
|---|
public BotObserverParams getParams()
BotObserver only with BotObserverParams (see constructor that enforces that).
getParams in class UT2004Observerpublic void playerEvent(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Player> event)
public void selfEvent(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Self> event)
public static void startObserver()
args -
public static void main(String[] args)
throws cz.cuni.amis.utils.exception.PogamutException
cz.cuni.amis.utils.exception.PogamutException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||