1 #ifndef _RIVE_BLEND_STATE_TRANSITION_BASE_HPP_
2 #define _RIVE_BLEND_STATE_TRANSITION_BASE_HPP_
3 #include "animation/state_transition.hpp"
4 #include "core/field_types/core_uint_type.hpp"
7 class BlendStateTransitionBase : public StateTransition
10 typedef StateTransition Super;
13 static const uint16_t typeKey = 78;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case BlendStateTransitionBase::typeKey:
22 case StateTransitionBase::typeKey:
23 case StateMachineLayerComponentBase::typeKey:
30 uint16_t coreType() const override { return typeKey; }
32 static const uint16_t exitBlendAnimationIdPropertyKey = 171;
35 int m_ExitBlendAnimationId = -1;
37 inline int exitBlendAnimationId() const
39 return m_ExitBlendAnimationId;
41 void exitBlendAnimationId(int value)
43 if (m_ExitBlendAnimationId == value)
47 m_ExitBlendAnimationId = value;
48 exitBlendAnimationIdChanged();
51 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
55 case exitBlendAnimationIdPropertyKey:
56 m_ExitBlendAnimationId = CoreUintType::deserialize(reader);
59 return StateTransition::deserialize(propertyKey, reader);
63 virtual void exitBlendAnimationIdChanged() {}