pub struct Tile {
pub index: u16,
pub frames: u16,
pub frame_ms: u16,
pub flip: Flip,
}Expand description
What a cell shows: a tile of its layer’s tile set, or the frames of an
animation, which the shader picks from RenderFrame::time with no
work on the CPU.
Fields§
§index: u16The tile, or the first frame. An index past the tile set’s last tile wraps around to the first.
frames: u16How many frames: tiles index, index + 1 and so on, each shown in
turn, then again from the first. 0 and 1 are a still tile.
frame_ms: u16How long each frame shows, in milliseconds. 0 counts as 1. Every tile of the same frame length changes frame at the same moment.
flip: FlipWhich way the tile is mirrored, in place.
Implementations§
Trait Implementations§
impl Copy for Tile
impl Eq for Tile
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Forget for Tile
impl Freeze for Tile
impl Move for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnsafeUnpin 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