Example #1
0
 // Update is called once per frame
 void Update()
 {
     for (int i = 0; i < transformAnimations.Count; i++)
     {
         _TransformAnimation anim = transformAnimations[i];
         anim.ExecuteStep(Time.deltaTime);
         if (anim.IsCompleted())
         {
             anim.HandleCompletion();
             transformAnimations.RemoveAt(i);
             i -= 1;
         }
     }
 }
Example #2
0
    public void AnimateTransformEuler(Transform transform, Vector3 from, Vector3 to, AnimationCallback callback, float animTime)
    {
        _TransformAnimation anim = new _TransformAnimation(transform, from, to, animTime, _TransformAnimation.Property.RotationEuler, callback);

        transformAnimations.Add(anim);
    }