Trait TileSource

Source
pub trait TileSource {
    // Required methods
    fn transformation(&self) -> OrthoTransformation;
    fn get_at(&self, position: Vector2<i32>) -> Option<TileDefinitionHandle>;
}
Expand description

A trait for types that can produce a TileDefinitionHandle upon demand, for use with drawing on tilemaps.

Required Methods§

Source

fn transformation(&self) -> OrthoTransformation

The transformation that should be applied to the tiles before they are written.

Source

fn get_at(&self, position: Vector2<i32>) -> Option<TileDefinitionHandle>

Produce a tile definition handle for the given position. If an area of multiple tiles is being filled, then the given position represents where the tile will go within the area.

Implementors§