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 Core* clone() const override;
49 void copy(const StateMachineBoolBase& object)
51 m_Value = object.m_Value;
52 StateMachineInput::copy(object);
55 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
59 case valuePropertyKey:
60 m_Value = CoreBoolType::deserialize(reader);
63 return StateMachineInput::deserialize(propertyKey, reader);
67 virtual void valueChanged() {}