pub struct Tile {
pub floor: Type,
pub ore: Type,
/* private fields */
}Expand description
a tile in a map
Fields§
§floor: Type§ore: TypeImplementations§
Source§impl Tile
impl Tile
pub const fn new(floor: BlockEnum, ore: BlockEnum) -> Self
pub const fn build(&self) -> Option<&Build>
pub fn has_ore(&self) -> bool
Sourcepub fn floor_image(&self, s: Scale) -> ImageHolder<3>
pub fn floor_image(&self, s: Scale) -> ImageHolder<3>
Draw the floor of this tile
Sourcepub fn build_image(
&self,
context: Option<&RenderingContext>,
s: Scale,
) -> ImageHolder<4>
pub fn build_image( &self, context: Option<&RenderingContext>, s: Scale, ) -> ImageHolder<4>
Draw this tiles build.
Trait Implementations§
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