Ejemplo n.º 1
0
    public IEnumerator Move(Vector3 byVector, Action onComplete)
    {
        for (int i = 0; i < 90 / _model.Step; i++)
        {
            _model.Rotate(byVector);
            yield return(new WaitForSeconds(_model.Speed * Time.deltaTime));
        }

        _model.ResetPivotPoint();

        if (onComplete != null)
        {
            onComplete();
        }
    }