/// <summary> /// Make the path finding request and /// start doing the track movement. /// </summary> /// <param name="pos"> Move to this position. </param> public void ActivePathfinding(Vector3 pos) { // clear the array mPath = null; // reset target index mTargetIndex = 0; // make path finding request JCS_PathRequestManager.RequestPath( this.transform.position, pos, OnPathFound); }
/* Setter & Getter */ /* Functions */ private void Awake() { instance = this; mPathfinding = this.GetComponent <JCS_Pathfinding>(); }