Exemple #1
0
    private void Update()
    {
        m_Timer += Time.deltaTime;

        if (m_Timer >= m_TargetSearchInterval)
        {
            m_Timer -= m_TargetSearchInterval;
            PathRequestSingleton.RequestPath(transform.position, m_Target.position, OnPathFound);
        }
    }
 private void Awake()
 {
     m_Instance    = this;
     m_Pathfinding = GetComponent <Pathfinding>();
 }
Exemple #3
0
 public void TryToMoveToDestination(Vector3 targetPosition)
 {
     PathRequestSingleton.RequestPath(transform.position, targetPosition, OnPathFound);
 }
 void Awake()
 {
     m_PathRequestHandler = GetComponent <PathRequestSingleton>();
     m_Grid = GetComponent <NavigationGrid>();
 }