blob: 793947aa384ceb5a686aeba13bca432ab5b3f672 [file] [log] [blame]
#include "rive/generated/animation/layer_state_base.hpp"
#include <stdio.h>
#include <vector>
namespace rive {
class Artboard;
class StateTransition;
class LayerStateImporter;
class StateMachineLayerImporter;
class StateInstance;
class LayerState : public LayerStateBase {
friend class LayerStateImporter;
friend class StateMachineLayerImporter;
std::vector<StateTransition*> m_Transitions;
void addTransition(StateTransition* transition);
StatusCode onAddedDirty(CoreContext* context) override;
StatusCode onAddedClean(CoreContext* context) override;
StatusCode import(ImportStack& importStack) override;
size_t transitionCount() const { return m_Transitions.size(); }
StateTransition* transition(size_t index) const {
if (index < m_Transitions.size()) {
return m_Transitions[index];
return nullptr;
/// Make an instance of this state that can be advanced and applied by
/// the state machine when it is active or being transitioned from.
virtual StateInstance* makeInstance(Artboard* instance) const;
} // namespace rive