public void Start()
    {
        if (Path == null)
        {
            return;
        }

        _currentPoint = Path.GetPathEnumarator();
        _currentPoint.MoveNext();

        if (_currentPoint.Current == null)
        {
            return;
        }

        transform.position = _currentPoint.Current.position;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        if (Path == null)
        {
            Debug.LogError("path cannot be null", gameObject);
            return;
        }

        _currentPoint = Path.GetPathEnumarator();
        _currentPoint.MoveNext();

        if (_currentPoint.Current == null)
        {
            return;
        }

        transform.position = _currentPoint.Current.position;
    }