pub struct Tile {
pub animation: Option<Vec<Frame>>,
pub id: u32,
pub image: Option<String>,
pub image_width: u32,
pub image_height: u32,
pub object_group: Option<ObjectGroup>,
pub properties: HashMap<String, TiledValue>,
pub terrain: Option<[i8; 4]>,
pub tile_type: Option<String>,
}
Expand description
Contains all possible data for a tile including an optional ObjectGroup
Fields§
§animation: Option<Vec<Frame>>
§id: u32
Unlike the ID used in the TileLayer
, this ID is
local to the TileSet
only and so starts at 0 (the
tile layer ID starts a 1 for tiles with 0 being no-tile).
image: Option<String>
Image representing this tile if it uses a separate image
image_width: u32
Width of the tile image in pixels
image_height: u32
Height of the tile image in pixels
object_group: Option<ObjectGroup>
§properties: HashMap<String, TiledValue>
§terrain: Option<[i8; 4]>
The order of indices is: top-left, top-right, bottom-left, bottom-right
Each entry is the index number in to the Terrain array to get the specific terrain type for this tile. Typically used in conjunction with the tileset structure as the terrain tiles are stored within the data there.
tile_type: Option<String>
An optional string for describing a type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tile
impl<'de> Deserialize<'de> for Tile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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