blob: 64d25bf7ff50153f410d41d3e48b94e7232e63d8 [file] [log] [blame]
#ifndef _RIVE_ANIMATION_STATE_INSTANCE_HPP_
#define _RIVE_ANIMATION_STATE_INSTANCE_HPP_
#include <string>
#include "rive/animation/state_instance.hpp"
#include "rive/animation/linear_animation_instance.hpp"
namespace rive {
class AnimationState;
/// Represents an instance of an animation state.
class AnimationStateInstance : public StateInstance {
private:
LinearAnimationInstance m_AnimationInstance;
bool m_KeepGoing;
public:
AnimationStateInstance(const AnimationState* animationState, Artboard* instance);
void advance(float seconds, SMIInput** inputs) override;
void apply(float mix) override;
bool keepGoing() const override;
const LinearAnimationInstance* animationInstance() const { return &m_AnimationInstance; }
LinearAnimationInstance* animationInstance() { return &m_AnimationInstance; }
};
} // namespace rive
#endif