|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.ai.behaviors.Behavior
Constructor Summary | |
Behavior(java.lang.String name)
|
Method Summary | |
void |
add(BehaviorElement be)
|
int |
getDistance(Point p1,
Point p2)
|
Commandable[] |
getNearbyTargets(Commandable agent,
Predicate hatesThesePlayers,
Predicate hatesTheseMonsters,
java.util.Set hates)
Returns a list of nearby targets close enough to chase and matching the appropriate predicate. |
void |
init()
|
void |
setNearestReachable(Commandable agent,
Commandable[] targets,
java.lang.String name)
Given a set of creatures, find the nearest one we can reach. |
void |
setNearestVisible(Commandable monster,
Commandable[] targets,
java.lang.String name)
Given a set of creatures, find the nearest one we have a clear LOS to. |
protected Point |
targetAdjacentMonster(Commandable monster,
Commandable target)
Looks for a player to target. |
void |
think(Commandable agent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Behavior(java.lang.String name)
Method Detail |
public void init()
public void add(BehaviorElement be)
public void think(Commandable agent)
public void setNearestVisible(Commandable monster, Commandable[] targets, java.lang.String name)
targets
- the non-null, nonempty set of nearby targetsname
- the name to use for the propertiespublic void setNearestReachable(Commandable agent, Commandable[] targets, java.lang.String name)
agent
- the monstertargets
- the non-null, nonempty set of nearby targetsname
- the name to use for the propertiespublic Commandable[] getNearbyTargets(Commandable agent, Predicate hatesThesePlayers, Predicate hatesTheseMonsters, java.util.Set hates)
agent
- the monster
protected Point targetAdjacentMonster(Commandable monster, Commandable target)
monster
- the monstertarget
- the target player/monster
public int getDistance(Point p1, Point p2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |