For instancing, the animation doesn't need to hold all the keyframes. We've got those in our texture. However, we do need to store some data - like the duration of the animation, the start index into the texture, and the frame rate of the animation
コード例 #1
0
 public void PlayAnimation(string name, bool looped)
 {
     _currentAnimation = Parent.AnimationClips[name];
     _repeatAnimation  = looped;
     _animationPlaying = true;
     _currentFrame     = _currentAnimation.StartRow;
 }
コード例 #2
0
 public void StopAnimation()
 {
     _currentFrame     = _currentAnimation.EndRow;
     _currentAnimation = null;
     _animationPlaying = false;
     _repeatAnimation  = false;
 }
コード例 #3
0
 public void StopAnimation()
 {
     _currentFrame = _currentAnimation.EndRow;
     _currentAnimation = null;
     _animationPlaying = false;
     _repeatAnimation = false;
 }
コード例 #4
0
 public void PlayAnimation(string name, bool looped)
 {
     _currentAnimation = Parent.AnimationClips[name];
     _repeatAnimation = looped;
     _animationPlaying = true;
     _currentFrame = _currentAnimation.StartRow;
 }