Struct rust_animation::actor::Actor [−][src]
pub struct Actor<'a> {Show 15 fields
pub name: String,
pub x: i32,
pub y: i32,
pub z: f32,
pub width: u32,
pub height: u32,
pub anchor_x: f32,
pub anchor_y: f32,
pub scale_x: f32,
pub scale_y: f32,
pub rotation: i32,
pub image_path: String,
pub sub_actor_list: Vec<Actor<'a>>,
pub animated: bool,
pub node: Option<Node>,
// some fields omitted
}
Fields
name: String
x: i32
y: i32
z: f32
width: u32
height: u32
anchor_x: f32
anchor_y: f32
scale_x: f32
scale_y: f32
rotation: i32
image_path: String
sub_actor_list: Vec<Actor<'a>>
animated: bool
node: Option<Node>
Implementations
pub fn new(
name: String,
w: u32,
h: u32,
event_handler: Option<Box<dyn EventHandler + 'a>>
) -> Self
pub fn apply_translation_x_animation(
&mut self,
from_value: i32,
to_value: i32,
time: f32,
easing: EasingFunction
)
pub fn apply_translation_y_animation(
&mut self,
from_value: i32,
to_value: i32,
time: f32,
easing: EasingFunction
)
pub fn apply_rotation_animation(
&mut self,
from_value: i32,
to_value: i32,
time: f32,
easing: EasingFunction
)
pub fn apply_scale_animation(
&mut self,
from_value: f32,
to_value: f32,
time: f32,
easing: EasingFunction
)
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Actor<'a>
impl<'a> !UnwindSafe for Actor<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.