rive_rs/animation/
state_machine_bool.rs
1use crate::animation::StateMachineInput;
6use crate::core::{Core, ObjectRef, OnAdded, Property};
7
8#[derive(Debug, Default)]
9pub struct StateMachineBool {
10 state_machine_input: StateMachineInput,
11 value: Property<bool>,
12}
13
14impl ObjectRef<'_, StateMachineBool> {
15 pub fn value(&self) -> bool {
16 self.value.get()
17 }
18
19 pub fn set_value(&self, value: bool) {
20 self.value.set(value);
21 }
22}
23
24impl Core for StateMachineBool {
25 parent_types![(state_machine_input, StateMachineInput)];
26
27 properties![(141, value, set_value), state_machine_input];
28}
29
30impl OnAdded for ObjectRef<'_, StateMachineBool> {
31 on_added!(StateMachineInput);
32}