pub struct SpriteInner {
    pub raw_sprite: *mut LCDSprite,
    /* private fields */
}

Fields§

§raw_sprite: *mut LCDSprite

Implementations§

source§

impl SpriteInner

source

pub fn set_use_custom_draw(&mut self) -> Result<(), Error>

source

pub fn set_collision_response_type( &mut self, response_type: Option<Box<dyn SpriteCollider>> ) -> Result<(), Error>

source

pub fn get_bounds(&self) -> Result<PDRect, Error>

source

pub fn set_bounds(&self, bounds: &PDRect) -> Result<(), Error>

source

pub fn get_z_index(&self) -> Result<i16, Error>

source

pub fn set_z_index(&self, z_index: i16) -> Result<(), Error>

source

pub fn get_image(&self) -> Option<&Bitmap>

Returns a reference to the bitmap assigned to the sprite, if any.

source

pub fn set_image( &mut self, bitmap: Bitmap, flip: LCDBitmapFlip ) -> Result<(), Error>

source

pub fn set_tag(&mut self, tag: u8) -> Result<(), Error>

source

pub fn get_tag(&self) -> Result<u8, Error>

source

pub fn move_to(&mut self, x: f32, y: f32) -> Result<(), Error>

source

pub fn get_position(&self) -> Result<(f32, f32), Error>

source

pub fn set_collide_rect(&mut self, collide_rect: &PDRect) -> Result<(), Error>

source

pub fn move_with_collisions( &mut self, goal_x: f32, goal_y: f32 ) -> Result<(f32, f32, Collisions), Error>

source

pub fn mark_dirty(&mut self) -> Result<(), Error>

Trait Implementations§

source§

impl Debug for SpriteInner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Drop for SpriteInner

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl PartialEq<SpriteInner> for SpriteInner

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.