pathfinder.h
来自「这是整套横扫千军3D版游戏的源码」· C头文件 代码 · 共 56 行
H
56 行
#ifndef PATHFINDER_H#define PATHFINDER_H#include "GlobalAI.h"using namespace NSMicroPather;class CPathFinder: public Graph { public: CPathFinder(AIClasses* ai); ~CPathFinder(); void Init(); void* XY2Node(int x, int y); void Node2XY(void* node, int* x, int* y); float3 Node2Pos(void* node); void* Pos2Node(float3 pos); void ClearPath(); unsigned Checksum(); float MakePath(vector<float3>* posPath, float3* startPos, float3* endPos, int radius); float FindBestPath(vector<float3>* posPath, float3* startPos, float myMaxRange, vector<float3>* possibleTargets); // added for convenience float FindBestPathToRadius(vector<float3>* posPath, float3* startPos, float radiusAroundTarget, float3* target); void CreateDefenseMatrix(); // virtual void PrintStateInfo(void* state) { // state = state; // } void PrintData(string s); MicroPather* micropather; bool* TestMoveArray; vector<bool*> MoveArrays; int NumOfMoveTypes; float* SlopeMap; float* HeightMap; int PathMapXSize; int PathMapYSize; int totalcells; double AverageHeight; private: std::vector<void*> path; float totalcost; float resmodifier; AIClasses* ai;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?