rive_rs/animation/
state_transition.rsuse crate::animation::StateMachineLayerComponent;
use crate::core::{Core, ObjectRef, OnAdded, Property};
#[derive(Debug, Default)]
pub struct StateTransition {
state_machine_layer_component: StateMachineLayerComponent,
state_to_id: Property<u64>,
flags: Property<u64>,
duration: Property<u64>,
}
impl ObjectRef<'_, StateTransition> {
pub fn state_to_id(&self) -> u64 {
self.state_to_id.get()
}
pub fn set_state_to_id(&self, state_to_id: u64) {
self.state_to_id.set(state_to_id);
}
pub fn flags(&self) -> u64 {
self.flags.get()
}
pub fn set_flags(&self, flags: u64) {
self.flags.set(flags);
}
pub fn duration(&self) -> u64 {
self.duration.get()
}
pub fn set_duration(&self, duration: u64) {
self.duration.set(duration);
}
}
impl Core for StateTransition {
parent_types![(state_machine_layer_component, StateMachineLayerComponent)];
properties![
(151, state_to_id, set_state_to_id),
(152, flags, set_flags),
(158, duration, set_duration),
state_machine_layer_component,
];
}
impl OnAdded for ObjectRef<'_, StateTransition> {
on_added!(StateMachineLayerComponent);
}