本文整理汇总了Java中org.andengine.util.algorithm.path.IPathFinderMap类的典型用法代码示例。如果您正苦于以下问题:Java IPathFinderMap类的具体用法?Java IPathFinderMap怎么用?Java IPathFinderMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPathFinderMap类属于org.andengine.util.algorithm.path包,在下文中一共展示了IPathFinderMap类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) {
final float dX = pToX - pFromX;
final float dY = pToY - pFromY;
return (float) Math.sqrt(dX * dX + dY * dY);
}
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:8,代码来源:EuclideanHeuristic.java
示例2: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) {
final float dX = pToX - pFromX;
final float dY = pToY - pFromY;
return FloatMath.sqrt(dX * dX + dY * dY);
}
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:8,代码来源:EuclideanHeuristic.java
示例3: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) {
return Math.abs(pFromX - pToX) + Math.abs(pFromY - pToY);
}
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:ManhattanHeuristic.java
示例4: findPath
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public Path findPath(final IPathFinderMap<T> pPathFinderMap, final int pXMin, final int pYMin, final int pXMax, final int pYMax, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY, final boolean pAllowDiagonal, final IAStarHeuristic<T> pAStarHeuristic, final ICostFunction<T> pCostFunction) {
return this.findPath(pPathFinderMap, pXMin, pYMin, pXMax, pYMax, pEntity, pFromX, pFromY, pToX, pToY, pAllowDiagonal, pAStarHeuristic, pCostFunction, Float.MAX_VALUE);
}
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:AStarPathFinder.java
示例5: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) {
return 0;
}
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:5,代码来源:NullHeuristic.java
示例6: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
@Override
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) {
return Math.abs(pFromX - pToX) + Math.abs(pToX - pToY);
}
开发者ID:Tacohen,项目名称:Killbots,代码行数:5,代码来源:ManhattanHeuristic.java
示例7: getExpectedRestCost
import org.andengine.util.algorithm.path.IPathFinderMap; //导入依赖的package包/类
public float getExpectedRestCost(final IPathFinderMap<T> pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY);
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:2,代码来源:IAStarHeuristic.java
注:本文中的org.andengine.util.algorithm.path.IPathFinderMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论