[][src]Trait amethyst_tiles::Tile

pub trait Tile: 'static + Clone + Send + Sync + Default {
    fn sprite(&self, coordinates: Point3<u32>, world: &World) -> Option<usize> { ... }
fn tint(&self, coordinates: Point3<u32>, world: &World) -> Srgba { ... } }

Trait providing generic rendering functionality to all tiles. Using a tilemap requires you to provide a Tile type, which must implement this trait to provide the RenderPass with the appropriate sprite and tint values.

Provided methods

fn sprite(&self, coordinates: Point3<u32>, world: &World) -> Option<usize>

Takes an immutable reference to world to process this sprite and return its sprite.

fn tint(&self, coordinates: Point3<u32>, world: &World) -> Srgba

Takes an immutable reference to world to process this sprite and return its tint.

Loading content...

Implementors

Loading content...