|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.agents.Targeting
public class Targeting
A parameter object that describes how an agent wants to find a target. The only reason this class is public is that Java has lame packaging mechanics.
Constructor Summary | |
---|---|
Targeting()
Constructor. |
Method Summary | |
---|---|
Targeting |
attackPlayer(int range)
Attack the player. |
Targeting |
dodgeBullets(int percentage)
Avoid any cell that has a direct line-of-fire between the player and the agent. |
Targeting |
fleePlayer(int range)
Run away from the player. |
Targeting |
keepDistance(int distance)
Set the distance (in cells) that an agent should keep from the player. |
Targeting |
moveRandomly()
Set the agent to move randomly if a target cannot be acquired. |
boolean |
targetsPlayerDirectly(Agent agent)
Does this targeting specification only includes moving toward the player? If so, we can use a faster algorithm for targeting. |
Targeting |
trackPlayer()
Track the player. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Targeting()
Method Detail |
---|
public Targeting attackPlayer(int range)
range
- the number of squares within which attack behavior applies
public Targeting dodgeBullets(int percentage)
percentage
-
public Targeting fleePlayer(int range)
range
-
public Targeting keepDistance(int distance)
distance
- the distance in cells to stay away from player
public Targeting moveRandomly()
public boolean targetsPlayerDirectly(Agent agent)
agent
-
public Targeting trackPlayer()
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark