|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.springrts.ai.oo.AbstractOOAI
public abstract class AbstractOOAI
Constructor Summary | |
---|---|
AbstractOOAI()
|
Method Summary | |
---|---|
int |
commandFinished(Unit unit,
int commandId,
int commandTopicId)
This AI event is sent when a unit finished processing a command. |
int |
enemyDamaged(Unit enemy,
Unit attacker,
float damage,
AIFloat3 dir,
WeaponDef weaponDef,
boolean paralyzer)
This AI event is sent when an enemy unit was damaged. |
int |
enemyDestroyed(Unit enemy,
Unit attacker)
This AI event is sent when an enemy unit was destroyed; see also the enemy-damaged event. |
int |
enemyEnterLOS(Unit enemy)
This AI event is sent when an enemy unit entered the LOS of this team. |
int |
enemyEnterRadar(Unit enemy)
This AI event is sent when an enemy unit entered the radar covered area of this team. |
int |
enemyLeaveLOS(Unit enemy)
This AI event is sent when an enemy unit left the LOS of this team. |
int |
enemyLeaveRadar(Unit enemy)
This AI event is sent when an enemy unit left the radar covered area of this team. |
int |
init(int teamId,
OOAICallback callback)
This AI event initializes a Skirmish AI instance. |
int |
load(String file)
Absolute file path, should be treated read-only |
int |
message(int player,
String message)
This AI event is a notification about a chat message sent by one of the participants of this game, which may be a player or an AI, including this AI. |
int |
playerCommand(List<Unit> units,
AICommand command,
int playerId)
see AISCommands.h S*Command structs |
int |
release(int reason)
This AI event tells a Skirmish AI instance, that it is no longer needed. |
int |
save(String file)
Absolute file path, writeable |
int |
seismicPing(AIFloat3 pos,
float strength)
This AI event is sent when a unit movement is detected by means of a seismic event. |
int |
unitCaptured(Unit unit,
int oldTeamId,
int newTeamId)
This AI event is sent when a unit changed from one team to an other through capturing. |
int |
unitCreated(Unit unit,
Unit builder)
This AI event is sent whenever a unit of this team is created, and contains the created unit. |
int |
unitDamaged(Unit unit,
Unit attacker,
float damage,
AIFloat3 dir,
WeaponDef weaponDef,
boolean paralyzer)
This AI event is sent when a unit was damaged. |
int |
unitDestroyed(Unit unit,
Unit attacker)
This AI event is sent when a unit was destroyed; see also the unit-damaged event. |
int |
unitFinished(Unit unit)
This AI event is sent whenever a unit is fully built, and contains the finnished unit. |
int |
unitGiven(Unit unit,
int oldTeamId,
int newTeamId)
This AI event is sent when a unit changed from one team to an other either because the old owner gave it to the new one, or because the new one took it from the old one; see the /take command. |
int |
unitIdle(Unit unit)
This AI event is sent when a unit finnished processing a command or just finished building, and it has currently no commands in it's queue. |
int |
unitMoveFailed(Unit unit)
This AI event is sent when a unit received a move command and is not able to fullfill it. |
int |
update(int frame)
This AI event is sent once per game frame, which is about 30 times per second by default. |
int |
weaponFired(Unit unit,
WeaponDef weaponDef)
This AI event is sent when a weapon is fired. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractOOAI()
Method Detail |
---|
public int init(int teamId, OOAICallback callback)
OOAI
init
in interface OOAI
public int release(int reason)
OOAI
release
in interface OOAI
public int update(int frame)
OOAI
update
in interface OOAI
public int message(int player, String message)
OOAI
message
in interface OOAI
public int unitCreated(Unit unit, Unit builder)
OOAI
unitCreated
in interface OOAI
public int unitFinished(Unit unit)
OOAI
unitFinished
in interface OOAI
public int unitIdle(Unit unit)
OOAI
unitIdle
in interface OOAI
public int unitMoveFailed(Unit unit)
OOAI
unitMoveFailed
in interface OOAI
public int unitDamaged(Unit unit, Unit attacker, float damage, AIFloat3 dir, WeaponDef weaponDef, boolean paralyzer)
OOAI
unitDamaged
in interface OOAI
public int unitDestroyed(Unit unit, Unit attacker)
OOAI
unitDestroyed
in interface OOAI
public int unitGiven(Unit unit, int oldTeamId, int newTeamId)
OOAI
unitGiven
in interface OOAI
public int unitCaptured(Unit unit, int oldTeamId, int newTeamId)
OOAI
unitCaptured
in interface OOAI
public int enemyEnterLOS(Unit enemy)
OOAI
enemyEnterLOS
in interface OOAI
public int enemyLeaveLOS(Unit enemy)
OOAI
enemyLeaveLOS
in interface OOAI
public int enemyEnterRadar(Unit enemy)
OOAI
enemyEnterRadar
in interface OOAI
public int enemyLeaveRadar(Unit enemy)
OOAI
enemyLeaveRadar
in interface OOAI
public int enemyDamaged(Unit enemy, Unit attacker, float damage, AIFloat3 dir, WeaponDef weaponDef, boolean paralyzer)
OOAI
enemyDamaged
in interface OOAI
public int enemyDestroyed(Unit enemy, Unit attacker)
OOAI
enemyDestroyed
in interface OOAI
public int weaponFired(Unit unit, WeaponDef weaponDef)
OOAI
weaponFired
in interface OOAI
public int playerCommand(List<Unit> units, AICommand command, int playerId)
OOAI
playerCommand
in interface OOAI
public int commandFinished(Unit unit, int commandId, int commandTopicId)
OOAI
commandFinished
in interface OOAI
commandId
- used on asynchronous commands only (is -1 for regular commands).
this allows the AI to identify a possible result event,
which would come with the same idcommandTopicId
- unique identifier of a command
(see COMMAND_* defines in AISCommands.h)callback.handleCommand(..., int commandId, ...)
public int seismicPing(AIFloat3 pos, float strength)
OOAI
seismicPing
in interface OOAI
public int load(String file)
OOAI
load
in interface OOAI
public int save(String file)
OOAI
save
in interface OOAI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |