1 #ifndef _RIVE_STATE_MACHINE_BOOL_BASE_HPP_
2 #define _RIVE_STATE_MACHINE_BOOL_BASE_HPP_
3 #include "animation/state_machine_input.hpp"
4 #include "core/field_types/core_bool_type.hpp"
7 class StateMachineBoolBase : public StateMachineInput
10 typedef StateMachineInput Super;
13 static const uint16_t typeKey = 59;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case StateMachineBoolBase::typeKey:
22 case StateMachineInputBase::typeKey:
23 case StateMachineComponentBase::typeKey:
30 uint16_t coreType() const override { return typeKey; }
32 static const uint16_t valuePropertyKey = 141;
37 inline bool value() const { return m_Value; }
38 void value(bool value)
48 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
52 case valuePropertyKey:
53 m_Value = CoreBoolType::deserialize(reader);
56 return StateMachineInput::deserialize(propertyKey, reader);
60 virtual void valueChanged() {}