|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpath.PathFinder
public class PathFinder
A class that provides static methods to return a path from the characters start location to his target location by constructing a list of Walk game actions,
Constructor Summary | |
---|---|
PathFinder()
|
Method Summary | |
---|---|
static void |
addPath(AbstractCharacterSprite c,
SearchGrid grid,
double x,
double y,
com.golden.gamedev.engine.BaseInput bsInput)
Finds a list of Walk game actions that represents a path from the characters current position to its destionation coordinates and adds it to the specified characters game action queue |
static java.util.List<AbstractGameAction> |
getPath(AbstractCharacterSprite c,
java.awt.image.BufferedImage imgWalkableArea,
double x,
double y)
Deprecated. do nut use this method any more |
static java.util.List<AbstractGameAction> |
getPath(AbstractCharacterSprite c,
SearchGrid grid,
double x,
double y,
com.golden.gamedev.engine.BaseInput bsInput)
Returns a list of Walk game actions that represents a path from the characters current position to its destionation coordinates |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathFinder()
Method Detail |
---|
public static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c, java.awt.image.BufferedImage imgWalkableArea, double x, double y)
c
- character to find the path forimgWalkableArea
- image that contains the walkable areax
- destination x coordinatey
- destination y coordinate
public static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c, SearchGrid grid, double x, double y, com.golden.gamedev.engine.BaseInput bsInput)
c
- character to find the path forgrid
- the search grid to calculate the path inx
- destination x coordinatey
- destination y coordinate
public static void addPath(AbstractCharacterSprite c, SearchGrid grid, double x, double y, com.golden.gamedev.engine.BaseInput bsInput)
c
- character to find the path forgrid
- the search grid to calculate the path inx
- destination x coordinatey
- destination y coordinatebsInput
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |