[][src]Struct tiled_json_rs::Tile

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>,
}

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

impl PartialEq<Tile> for Tile[src]

impl Clone for Tile[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Tile[src]

impl<'de> Deserialize<'de> for Tile[src]

Auto Trait Implementations

impl Send for Tile

impl Unpin for Tile

impl Sync for Tile

impl UnwindSafe for Tile

impl RefUnwindSafe for Tile

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]