//Constructor
 public Pathfinder(Node start, Node target, PathfindMaster.PathfindingJobComplete callback)
 {
     startPosition = start;
     endPosition = target;
     completeCallback = callback;
     gridBase = GridBase.GetInstance();
 }
Exemple #2
0
    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;
    }
Exemple #3
0
 void Awake()
 {
     instance = this;
 }
 void Awake()
 {
     instance = this;
 }
 private void Awake()
 {
     instance = this;
 }