Ejemplo n.º 1
0
    private void HandleQueryTarget(Transform t)
    {
        if (_currentWayPoint)
        {
            t = _currentWayPoint.transform;
            OnWayPointSet?.Invoke(_currentWayPoint.transform);
        }

        else
        {
            SetNewWayPoint();
        }
    }
Ejemplo n.º 2
0
 public void SetNewWayPoint()
 {
     _currentWayPoint = Instantiate(_wayPointPrefab, GetNextPosition(), Quaternion.identity);
     OnWayPointSet?.Invoke(_currentWayPoint.transform);
 }