示例#1
0
 /// <summary>
 /// Changes the overworld object's current animation to the specified index.
 /// </summary>
 /// <param name="animationIndex">The index number of the animation to change to.</param>
 /// <param name="framesGiven">The amount of frames given for the animation to play fully. (set to -1 for default play speed)</param>
 /// <param name="isLooping">Whether or not the animation should loop after completion.</param>
 public void SetAnimation(int animationIndex, float framesGiven, bool isLooping)
 {
     StopCoroutine(currentAnimation);
     currentlyAnimating = false;
     animationScript.SetAnimationPatternIndex(animationIndex);
     animationScript.SetFramesGiven(framesGiven);
     animationScript.SetIsLooping(isLooping);
     animationQueue.Clear();
     animationScript.PlayAnimation();
 }