Ejemplo n.º 1
0
        public void Play(string key)
        {
            var animation = _animations[key];
            if (animation == _currentAnimation)
                return;

            _currentAnimation = _animations[key];
            _currentAnimation.Reset();
            Renderer.As<SpriteSheetRenderer>().Frame = _currentAnimation.CurrentFrame;
        }
Ejemplo n.º 2
0
 public void Add(string key, int[] frames, int rate)
 {
     _animations[key] = new AnimationState(frames, rate);
 }
Ejemplo n.º 3
0
 public void Add(string key, int frame)
 {
     _animations[key] = new AnimationState(frame);
 }
Ejemplo n.º 4
0
 public void Add(string key, int[] frames, int rate)
 {
     _animations[key] = new AnimationState(frames, rate);
 }
Ejemplo n.º 5
0
 public void Add(string key, int frame)
 {
     _animations[key] = new AnimationState(frame);
 }