cz.cuni.amis.pogamut.defcon.ai
Class AbstractAI
java.lang.Object
cz.cuni.amis.pogamut.defcon.ai.AbstractAI
- All Implemented Interfaces:
- IUnitAI
- Direct Known Subclasses:
- AbstractBuildingAI
public abstract class AbstractAI
- extends Object
- implements IUnitAI
Implementation of common features for all units.
- Author:
- Radek 'Black_Hand' Pibil
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logic
public final DefConAgentLogicController<?> logic
unitId
public final int unitId
worldObjectId
public final WorldObjectId worldObjectId
AbstractAI
public AbstractAI(DefConAgentLogicController<?> logic,
WorldObjectId worldObjectId)
receiveMessage
public void receiveMessage(IMessage message)
- Description copied from interface:
IUnitAI
- Receives a message from mailbox.
- Specified by:
receiveMessage
in interface IUnitAI
getId
public WorldObjectId getId()
- Description copied from interface:
IUnitAI
- Returns the
WorldObjectId
of the associated unit.
- Specified by:
getId
in interface IUnitAI
- Returns:
act
protected final void act(DefConCommand command)
- Simplifies posting of commands.
- Parameters:
command
-
dispose
public void dispose()
- Description copied from interface:
IUnitAI
- Unregisters ai from all places. ALWAYS CALL SUPER.DISPOSE!
- Specified by:
dispose
in interface IUnitAI
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.