Пример #1
0
 /// <summary>
 /// Starts the interpolation and calls the delegate specified
 /// </summary>
 void FollowSpline(OnEndCallback callback)
 {
     if (mTransforms.Length > 0)
     {
         SetupSplineInterpolator(mSplineInterp, mTransforms);
         mSplineInterp.StartInterpolation(callback, WrapMode);
     }
 }
Пример #2
0
	public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode)
	{
		if (mState != "Reset")
			throw new System.Exception("First reset, add points and then call here");

		mState = mode == eWrapMode.ONCE ? "Once" : "Loop";
		mRotations = bRotations;
		mOnEndCallback = endCallback;

		SetInput();
	}
Пример #3
0
    public void StartInterpolation(OnEndCallback endCallback, eWrapMode mode)
    {
        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #4
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode)
    {
        if (mState != "Reset")
        {
            return;
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations     = bRotations;
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #5
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode)
    {
        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }
        // commented Debug.Log("StarT");
        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations     = bRotations;
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #6
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode, float velocity = 0.0f)
    {
        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations     = bRotations;
        mOnEndCallback = endCallback;

        mVelocity = velocity;

        SetInput();
    }
Пример #7
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode, bool isDrawer = false)
    {
        _isDrawer = isDrawer;

        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations     = bRotations;
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #8
0
    public void StartInterpolation(OnEndCallback endCallback, eWrapMode mode, bool rotates = false, bool isDrawer = false, float rotationLookAhead = 0)
    {
        _rotates           = rotates;
        _rotationLookAhead = rotationLookAhead;
        _isDrawer          = isDrawer;

        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #9
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode)
    {
        //Debug.Log(Time.realtimeSinceStartup + " " + this + " StartInterpolation " + endCallback + " " + bRotations + " " + mode);

        if (mState != "Reset")
        {
            throw new System.Exception("First reset, add points and then call here");
        }

        mState         = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations     = bRotations;
        mOnEndCallback = endCallback;

        SetInput();

        mPaused = false;
    }
Пример #10
0
 public virtual void OnEnd()
 {
     OnEndCallback?.Invoke(this);
 }
Пример #11
0
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations, eWrapMode mode)
    {
        //Debug.Log(Time.realtimeSinceStartup + " " + this + " StartInterpolation " + endCallback + " " + bRotations + " " + mode);

        if (mState != "Reset")
            throw new System.Exception("First reset, add points and then call here");

        mState = mode == eWrapMode.ONCE ? "Once" : "Loop";
        mRotations = bRotations;
        mOnEndCallback = endCallback;

        SetInput();

        mPaused = false;
    }
    public void StartInterpolation(OnEndCallback endCallback, bool bRotations)
    {
        if (m_state != InterpolationState.RESET)
            throw new System.Exception("First reset, add points and then call here");

        m_state = InterpolationState.ONCE;
        m_rotations = bRotations;
        mOnEndCallback = endCallback;

        SetInput();
    }
Пример #13
0
 public void Play(OnEndCallback callback)
 {
     Setup();
     FollowSpline(callback);
 }
Пример #14
0
 public void OnAnimationEnd(Animator animation)
 {
     OnEndCallback?.Invoke();
 }