Java 类org.newdawn.slick.util.pathfinding.Mover 实例源码

项目:trashjam2017    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:trashjam2017    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:Progetto-C    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:Progetto-C    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:BaseClient    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:BaseClient    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:SmartRover    文件:LabMap.java   
/**
 * @see TileBasedMap#blocked(Mover, int, int)
 */
public boolean blocked(Mover mover, int x, int y) {
    // if there's a unit at the location, then it's blocked

    if (getUnit(x,y) != 0) {
        return true;
    }

    int unit = ((RoverMover) mover).getType();

    // Either it's blocked or its not, simpler
    return terrain[x][y] == BLOCKED;
}
项目:SmartRover    文件:PresentationMap.java   
/**
 * @see org.newdawn.slick.util.pathfinding.TileBasedMap#blocked(org.newdawn.slick.util.pathfinding.Mover, int, int)
 */
public boolean blocked(Mover mover, int x, int y) {
    // if theres a unit at the location, then it's blocked

    if (getUnit(x,y) != 0) {
        return true;
    }

    int unit = ((RoverMover) mover).getType();

    // Either it's blocked or its not, simpler
    return terrain[x][y] == BLOCKED;
}
项目:SmartRover    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:GPVM    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:GPVM    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:GPVM    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:GPVM    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:SpaceStationAlpha    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:SpaceStationAlpha    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:cretion    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:cretion    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:JavaRA    文件:VehiclePathfinder.java   
@Override
   public float getCost(TileBasedMap ctx, Mover mover, int x, int y,
    int goalX, int goalY) {
return Math.max(Math.abs(x - goalX), Math.abs(y - goalY));
/*
      float diagonal = Math.min(Math.abs(x - goalX), Math.abs(y - goalY));
      float straight = (Math.abs(x - goalX) + Math.abs(y - goalY));
      float h = (DIAGONAL_COST * diagonal) + (ADJACENT_COST * (straight - (2f * diagonal)));

      return h;*/
   }
项目:slick2d-maven    文件:ClosestSquaredHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    return ((dx*dx)+(dy*dy));
}
项目:slick2d-maven    文件:ClosestHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx, int ty) {     
    float dx = tx - x;
    float dy = ty - y;

    float result = (float) (Math.sqrt((dx*dx)+(dy*dy)));

    return result;
}
项目:trashjam2017    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:trashjam2017    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:Progetto-C    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:Progetto-C    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:BaseClient    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:BaseClient    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:SmartRover    文件:LabMap.java   
/**
 * @see TileBasedMap#getCost(Mover, int, int, int, int)
 */
public float getCost(Mover mover, int sx, int sy, int tx, int ty) {
    return 1;
}
项目:SmartRover    文件:PresentationMap.java   
/**
 * @see org.newdawn.slick.util.pathfinding.TileBasedMap#getCost(Mover, int, int, int, int)
 */
public float getCost(Mover mover, int sx, int sy, int tx, int ty) {
    return 1;
}
项目:GPVM    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:GPVM    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:GPVM    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:SpaceStationAlpha    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:SpaceStationAlpha    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:cretion    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:cretion    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:JavaRA    文件:InfantryPathfinder.java   
@Override
   public float getCost(TileBasedMap ctx, Mover mover, int x, int y,
    int goalX, int goalY) {
return Math.max(Math.abs(x - goalX), Math.abs(y - goalY));
   }
项目:slick2d-maven    文件:ManhattanHeuristic.java   
/**
 * @see AStarHeuristic#getCost(TileBasedMap, Mover, int, int, int, int)
 */
public float getCost(TileBasedMap map, Mover mover, int x, int y, int tx,
        int ty) {
    return minimumCost * (Math.abs(x-tx) + Math.abs(y-ty));
}
项目:slick2d-maven    文件:NavMeshTest.java   
public Mover getMover() {
    return null;
}
项目:trashjam2017    文件:NavMeshBuilder.java   
/**
 * Path finding context implementation
 * 
 * @return The current mover
 */
public Mover getMover() {
    return null;
}
项目:Progetto-C    文件:NavMeshBuilder.java   
/**
 * Path finding context implementation
 * 
 * @return The current mover
 */
public Mover getMover() {
    return null;
}