blob: 8c6244ae7dfbc3858c43e15a1a9c8d6635dc43fc [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);
void advance(float seconds, SMIInput** inputs) override;
void apply(Artboard* artboard, float mix) override;
bool keepGoing() const override;
const LinearAnimationInstance* animationInstance() const {
return &m_AnimationInstance;
}
LinearAnimationInstance* animationInstance() {
return &m_AnimationInstance;
}
};
} // namespace rive
#endif