pub trait SpriteCollection<T>
where T: Send + Sync,
{ // Required method fn sprite(&self, tile: &T) -> Option<SpriteSource>; // Provided method fn sprites(&self, tiles: &[T]) -> Vec<SpriteSource> { ... } }
Expand description

A collection of sprites.

Required Methods§

source

fn sprite(&self, tile: &T) -> Option<SpriteSource>

Returns the sprite referred to by tile.

Provided Methods§

source

fn sprites(&self, tiles: &[T]) -> Vec<SpriteSource>

Returns all of the requested tiles.

§Panics

Panics if a tile is not found.

Implementors§

source§

impl<T> SpriteCollection<T> for SpriteMap<T>
where T: Send + Sync + Eq + Hash,

source§

impl<T> SpriteCollection<T> for SpriteSheet<T>
where T: Debug + Send + Sync + Eq + Hash,