Struct crankstart::sprite::SpriteInner
source · pub struct SpriteInner {
pub raw_sprite: *mut LCDSprite,
/* private fields */
}
Fields§
§raw_sprite: *mut LCDSprite
Implementations§
source§impl SpriteInner
impl SpriteInner
pub fn set_use_custom_draw(&mut self) -> Result<(), Error>
pub fn set_collision_response_type( &mut self, response_type: Option<Box<dyn SpriteCollider>> ) -> Result<(), Error>
pub fn get_bounds(&self) -> Result<PDRect, Error>
pub fn set_bounds(&self, bounds: &PDRect) -> Result<(), Error>
pub fn get_z_index(&self) -> Result<i16, Error>
pub fn set_z_index(&self, z_index: i16) -> Result<(), Error>
sourcepub fn get_image(&self) -> Option<&Bitmap>
pub fn get_image(&self) -> Option<&Bitmap>
Returns a reference to the bitmap assigned to the sprite, if any.
pub fn set_image( &mut self, bitmap: Bitmap, flip: LCDBitmapFlip ) -> Result<(), Error>
pub fn set_tag(&mut self, tag: u8) -> Result<(), Error>
pub fn get_tag(&self) -> Result<u8, Error>
pub fn move_to(&mut self, x: f32, y: f32) -> Result<(), Error>
pub fn get_position(&self) -> Result<(f32, f32), Error>
pub fn set_collide_rect(&mut self, collide_rect: &PDRect) -> Result<(), Error>
pub fn move_with_collisions( &mut self, goal_x: f32, goal_y: f32 ) -> Result<(f32, f32, Collisions), Error>
pub fn mark_dirty(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl Debug for SpriteInner
impl Debug for SpriteInner
source§impl Drop for SpriteInner
impl Drop for SpriteInner
source§impl PartialEq<SpriteInner> for SpriteInner
impl PartialEq<SpriteInner> for SpriteInner
Auto Trait Implementations§
impl !RefUnwindSafe for SpriteInner
impl !Send for SpriteInner
impl !Sync for SpriteInner
impl Unpin for SpriteInner
impl !UnwindSafe for SpriteInner
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