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>(); }
public void TryToMoveToDestination(Vector3 targetPosition) { PathRequestSingleton.RequestPath(transform.position, targetPosition, OnPathFound); }
void Awake() { m_PathRequestHandler = GetComponent <PathRequestSingleton>(); m_Grid = GetComponent <NavigationGrid>(); }