GetPathEnumerator() публичный Метод

public GetPathEnumerator ( ) : IEnumerator
Результат IEnumerator
Пример #1
0
    public void Start()
    {
        if (Path == null)
        {
            Debug.LogError("Path cannot be null", gameObject);
        }

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

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

        transform.position = _currentPoint.Current.position;
    }
Пример #2
0
 public void Start()
 {
     if (path == null)
     {
         Debug.LogError("Path boş bırakıldı!", gameObject);
         return;
     }
     _currentPoint = path.GetPathEnumerator();
     _currentPoint.MoveNext();
     transform.position = _currentPoint.Current.position;
 }
Пример #3
0
    public void Start()
    {
        if (Path == null)
        {
            return;
        }
        _currentPoint = Path.GetPathEnumerator();
        _currentPoint.MoveNext();

        if (_currentPoint.Current == null)
        {
            return;
        }
        transform.position = _currentPoint.Current.position;
    }
Пример #4
0
 public void Start()
 {
     if (path == null)
     {
         Debug.LogError("Path cannot be null!!!!");
         return;
     }
     _currPoint = path.GetPathEnumerator();
     _currPoint.MoveNext();
     if (_currPoint.Current == null)
     {
         return;
     }
     transform.position = _currPoint.Current.position;
 }
Пример #5
0
    public void Start()
    {
        _Path = GameObject.Find("EnemyPath");
        path  = _Path.GetComponent <PathDefinition>();

        _currentPoint = path.GetPathEnumerator();
        _currentPoint.MoveNext();

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

        transform.position = _currentPoint.Current.position;
    }
Пример #6
0
    // Use this for initialization
    public void Start()
    {
        if (Path == null)
        {
            Debug.LogError("Es muss ein Pfad gesetzt werden");
            return;
        }

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

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

        transform.position = _currentPoint.Current.position;
    }
Пример #7
0
    public void Start()
    {
        if (Path == null)
        {
            Debug.LogError("Path cannot be null", gameObject);
            return;
        }

        _currentPoint = Path.GetPathEnumerator(); //Note: it not executes GetPathEnumerator
        _currentPoint.MoveNext();                 //Trigger first exeution of iterator block

        if (_currentPoint == null)
        {
            return;
        }

        transform.position = _currentPoint.Current.position;
    }
Пример #8
0
    public void Start()
    {
        Player = GetComponent <Rigidbody2D> ();
        if (path == null)
        {
            Debug.LogError("Path cannot be found", gameObject);
            return;
        }
        _currentPoint = path.GetPathEnumerator();
        _currentPoint.MoveNext();

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

        transform.position = _currentPoint.Current.position;
    }
Пример #9
0
    // Use this for initialization
    private void Start()
    {
        lastTargetPosition = target.position;
        offsetZ            = (transform.position - target.position).z;
        transform.parent   = null;

        if (Path == null)
        {
            return;
        }
        currentCameraPointPreview = Path.GetPathEnumerator();
        currentCameraPointPreview.MoveNext();

        if (currentCameraPointPreview.Current == null)
        {
            return;
        }
        transform.position = currentCameraPointPreview.Current.position;
    }
Пример #10
0
    // -------------------------------------------------------------------------
    public void Reset()
    {
        if (mPathDefinition == null)
        {
            Debug.LogError(gameObject + ": path definition cannot be null");
            return;
        }

        mPathNodes = mPathDefinition.GetPathEnumerator();
        mPathNodes.MoveNext();

        mCurrentPathNode = mPathNodes.Current;

        mPathNodes.MoveNext();
        mTargetPathNode = mPathNodes.Current;

        mTimer.Set(mCurrentPathNode.Delay);
        mState = ePathFollowerState.Waiting;

        mFinished = false;
    }