pub fn add_animation(
        &mut self,
        id: I,
        animation: &Handle<Animation<T>>,
        end: EndControl,
        rate_multiplier: f32,
        command: AnimationCommand<T>,
    ) {
        if let Some(_) = self.animations.iter().find(|a| a.0 == id) {
            return;
        }
        self.animations.push((
            id,
            AnimationControl::new(
                animation.clone(),
                end,
                ControlState::Requested,
                command,
                rate_multiplier,
            ),
        ));
    }
/// Add animation with the given id, unless it already exists
Add animation with the given id, unless it already exists
Add animation with the given id unless it already exists
pub fn add_animation(
        &mut self,
        id: I,
        animation: &Handle<Animation<T>>,
        end: EndControl,
        rate_multiplier: f32,
        command: AnimationCommand<T>,
    ) {
        if let Some(_) = self.animations.iter().find(|a| a.0 == id) {
            return;
        }
        self.animations.push((
            id,
            AnimationControl::new(
                animation.clone(),
                end,
                ControlState::Requested,
                command,
                rate_multiplier,
            ),
        ));
    }
pub fn add_animation ( & mut self , id : I , animation : & Handle < Animation < T > > , end : EndControl , rate_multiplier : f32 , command : AnimationCommand < T > , ) { if let Some ( _ ) = self . animations . iter ( ) . find ( | a | a . 0 == id ) { return ; } self . animations . push ( ( id , AnimationControl :: new ( animation . clone ( ) , end , ControlState :: Requested , command , rate_multiplier , ) , ) ) ; }
Add animation with the given id, unless it already exists
Add animation with the given id unless it already exists
&mut self
id
I
animation
&Handle<Animation<T>>
end
EndControl
rate_multiplier
f32
command
AnimationCommand<T>
&mut self
id
I
animation
&Handle<Animation<T>>
end
EndControl
rate_multiplier
f32
command
AnimationCommand<T>