up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / animation / animation_state_instance.hpp
1 #ifndef _RIVE_ANIMATION_STATE_INSTANCE_HPP_
2 #define _RIVE_ANIMATION_STATE_INSTANCE_HPP_
3
4 #include <string>
5 #include "animation/state_instance.hpp"
6 #include "animation/linear_animation_instance.hpp"
7
8 namespace rive
9 {
10         class AnimationState;
11
12         /// Represents an instance of an animation state.
13         class AnimationStateInstance : public StateInstance
14         {
15         private:
16                 LinearAnimationInstance m_AnimationInstance;
17                 bool m_KeepGoing;
18
19         public:
20                 AnimationStateInstance(const AnimationState* animationState);
21
22                 void advance(float seconds, SMIInput** inputs) override;
23                 void apply(Artboard* artboard, float mix) override;
24
25                 bool keepGoing() const override;
26
27                 const LinearAnimationInstance* animationInstance() const
28                 {
29                         return &m_AnimationInstance;
30                 }
31
32                 LinearAnimationInstance* animationInstance()
33                 {
34                         return &m_AnimationInstance;
35                 }
36         };
37 } // namespace rive
38 #endif