Monogame Animated Sprite __exclusive__ Site

// Example controls var kstate = Keyboard.GetState(); if (kstate.IsKeyDown(Keys.Space) && !_animatedSprite.IsPlaying) _animatedSprite.Play(); if (kstate.IsKeyDown(Keys.P)) _animatedSprite.Pause(); if (kstate.IsKeyDown(Keys.R)) _animatedSprite.Restart();

if (_currentFrame >= _frames.Count) { if (_looping) _currentFrame = 0; else { _currentFrame = _frames.Count - 1; IsPlaying = false; } } } } monogame animated sprite

public bool IsPlaying { get; private set; } // Example controls var kstate = Keyboard

We use cookies to ensure that we give you the best experience on our website.