//Constructor public Pathfinder(Node start, Node target, PathfindMaster.PathfindingJobComplete callback) { startPosition = start; endPosition = target; completeCallback = callback; gridBase = GridBase.GetInstance(); }
void Start() { agent = GetComponent <NavMeshAgent>(); path = Pathfinding.PathfindMaster.GetInstance(); aiState = AIState.idle; ChangeState(AIState.idle); //Sets the start position of the AI on the grid. GridMaster.GridBase grid = GridMaster.GridBase.GetInstance(); currNode = grid.GetNode(0, 0, 0); transform.position = currNode.nRef.vis.transform.position; }
void Awake() { instance = this; }