pub struct Tileset {
pub first_gid: u32,
pub source: String,
pub tiles: Vec<Option<Tile>>,
pub image: Option<Texture>,
pub tile_size: Vec2,
}
Expand description
A tileset
Fields§
§first_gid: u32
The global tile id of the first tile in this tileset.
source: String
The source file of this tileset, or it’s name if it’s an embedded tileset.
tiles: Vec<Option<Tile>>
The tiles contained in this tileset.
image: Option<Texture>
The image that the tiles are taken from, or None
if all tiles provide their own image.
tile_size: Vec2
The size in pixels of tiles in this tileset
Auto Trait Implementations§
impl Freeze for Tileset
impl RefUnwindSafe for Tileset
impl Send for Tileset
impl Sync for Tileset
impl Unpin for Tileset
impl UnwindSafe for Tileset
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more