pub struct Tile {
pub index: u8,
pub group: u8,
pub flags: u8,
}
Expand description
The smallest part of a Tilemap, contains a tile index and its flags.
Fields§
§index: u8
§group: u8
§flags: u8
Implementations§
source§impl Tile
impl Tile
pub fn flipped_h(&self) -> bool
pub fn set_flipped_h(&mut self, value: bool)
pub fn flipped_v(&self) -> bool
pub fn set_flipped_v(&mut self, value: bool)
pub fn is_collider(&self) -> bool
pub fn set_collider(&mut self, value: bool)
pub fn serialize(&self) -> [u8; 3]
pub fn deserialize(cursor: &mut Cursor<'_, u8>) -> Self
Trait Implementations§
source§impl PartialEq for Tile
impl PartialEq for Tile
impl Copy for Tile
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnwindSafe for Tile
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