blob: f2086f0cad2ee43e0bf26a48f20ae219d6000eb0 [file] [log] [blame]
#include "rive/generated/animation/layer_state_base.hpp"
#include <stdio.h>
#include <vector>
namespace rive {
class ArtboardInstance;
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(ArtboardInstance*) const;
} // namespace rive