[][src]Trait yy_boss::SpriteExt

pub trait SpriteExt: Sized {
    pub fn with(self, edit: impl Fn(&mut Self)) -> Self;
pub fn new(
        name: &str,
        texture_group_id: TexturePath,
        parent: ViewPath
    ) -> Self;
pub fn with_layer(
        name: &str,
        texture_group_id: TexturePath,
        layer: Layer,
        parent: ViewPath
    ) -> Sprite;
pub fn parent(self, parent: ViewPath) -> Sprite;
pub fn bbox_mode(self, f: impl Fn(isize, isize) -> BboxModeUtility) -> Self;
pub fn collision_kind(self, collision_kind: CollisionKind) -> Self;
pub fn frame(self, frame_id: FrameId) -> Self;
pub fn clear_all_frames(self) -> Self;
pub fn origin(self, origin: OriginUtility, locked: bool) -> Self;
pub fn playback_speed(self, pback_speed: PlaybackSpeed, speed: f64) -> Self;
pub fn dimensions(self, width: NonZeroUsize, height: NonZeroUsize) -> Self;
pub fn set_clear_all_frames(&mut self); }

Required methods

pub fn with(self, edit: impl Fn(&mut Self)) -> Self[src]

pub fn new(name: &str, texture_group_id: TexturePath, parent: ViewPath) -> Self[src]

pub fn with_layer(
    name: &str,
    texture_group_id: TexturePath,
    layer: Layer,
    parent: ViewPath
) -> Sprite
[src]

pub fn parent(self, parent: ViewPath) -> Sprite[src]

pub fn bbox_mode(self, f: impl Fn(isize, isize) -> BboxModeUtility) -> Self[src]

pub fn collision_kind(self, collision_kind: CollisionKind) -> Self[src]

pub fn frame(self, frame_id: FrameId) -> Self[src]

pub fn clear_all_frames(self) -> Self[src]

Clears all of the frames from the given image. Generally speaking, a sprite should have at least one frame when imported into GMS2, but this function will leave it entirely bare.

Builder version.

pub fn origin(self, origin: OriginUtility, locked: bool) -> Self[src]

pub fn playback_speed(self, pback_speed: PlaybackSpeed, speed: f64) -> Self[src]

pub fn dimensions(self, width: NonZeroUsize, height: NonZeroUsize) -> Self[src]

pub fn set_clear_all_frames(&mut self)[src]

Clears all of the frames from the given image. Generally speaking, a sprite should have at least one frame when imported into GMS2, but this function will leave it entirely bare.

Loading content...

Implementations on Foreign Types

impl SpriteExt for Sprite[src]

pub fn clear_all_frames(self) -> Self[src]

Test

pub fn set_clear_all_frames(&mut self)[src]

Another test

Loading content...

Implementors

Loading content...