pub struct ActionDef { /* private fields */ }Implementations§
Source§impl ActionDef
impl ActionDef
Sourcepub fn prop(
duration: f32,
start: f32,
stop: f32,
prop: Property,
easing: EaseType,
) -> ActionDef
pub fn prop( duration: f32, start: f32, stop: f32, prop: Property, easing: EaseType, ) -> ActionDef
Creates a new action definition object to change a property of a node.
§Arguments
duration- The duration of the action.start- The starting value of the property.stop- The ending value of the property.prop- The property to change.easing- The easing function to use.
§Returns
ActionDef- A new ActionDef object.
Sourcepub fn frame(clip_str: &str, duration: f32) -> ActionDef
pub fn frame(clip_str: &str, duration: f32) -> ActionDef
Creates a new action definition object to do a frame animation. Can only be performed on a Sprite node.
§Arguments
clipStr- The name of the image clip, which is a sprite sheet. Can be “Image/file.png” and “Image/items.clip|itemA”. Supports image file format: jpg, png, dds, pvr, ktx.duration- The duration of the action.
§Returns
ActionDef- A new ActionDef object.
Sourcepub fn frame_with_frames(
clip_str: &str,
duration: f32,
frames: &Vec<i32>,
) -> ActionDef
pub fn frame_with_frames( clip_str: &str, duration: f32, frames: &Vec<i32>, ) -> ActionDef
Creates a new action definition object to do a frame animation with frames count for each frame. Can only be performed on a Sprite node.
§Arguments
clipStr- The name of the image clip, which is a sprite sheet. Can be “Image/file.png” and “Image/items.clip|itemA”. Supports image file format: jpg, png, dds, pvr, ktx.duration- The duration of the action.frames- The number of frames for each frame.
§Returns
Action- A new Action object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActionDef
impl RefUnwindSafe for ActionDef
impl Send for ActionDef
impl Sync for ActionDef
impl Unpin for ActionDef
impl UnsafeUnpin for ActionDef
impl UnwindSafe for ActionDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more