private void PlayAnimation(UvAnimation animation) { if (animation is SimpleUvAnimation) { mComplexUvAnimator.StopAnimation(); SimpleUvAnimation simpleUvAnimation = (SimpleUvAnimation)animation; mComplexUvAnimator.PlayUvAnimation(simpleUvAnimation); } else if (animation is ComplexUvAnimation) { mComplexUvAnimator.StopAnimation(); ComplexUvAnimation complexUvAnimation = (ComplexUvAnimation)animation; mScheduler.StartCoroutine(mComplexUvAnimator.PlayComplexAnimation(complexUvAnimation)); } else { Console.LogError("UvAnimation being passed into PlayAnimation is neither a SimpleUvAnimation or ComplexUvAnimation type"); } }
public FaceAnimation(string name, UvAnimation initialAnimation, List <UvAnimation> animationSet) { mName = name; mInitialAnimation = initialAnimation; mAnimationSet = animationSet; }