Struct twmap::TilesLayer
source · pub struct TilesLayer {
pub name: String,
pub detail: bool,
pub color: Rgba<u8>,
pub color_env: Option<u16>,
pub color_env_offset: i32,
pub image: Option<u16>,
pub tiles: CompressedData<Array2<Tile>, TilesLoadInfo>,
pub automapper_config: AutomapperConfig,
}
Fields§
§name: String
§detail: bool
§color: Rgba<u8>
§color_env: Option<u16>
§color_env_offset: i32
§image: Option<u16>
§tiles: CompressedData<Array2<Tile>, TilesLoadInfo>
§automapper_config: AutomapperConfig
Implementations§
source§impl TilesLayer
impl TilesLayer
source§impl TilesLayer
impl TilesLayer
sourcepub fn run_automapper(
&mut self,
automapper: &Automapper
) -> Result<(), ConfigOutOfBounds>
pub fn run_automapper( &mut self, automapper: &Automapper ) -> Result<(), ConfigOutOfBounds>
Requires tiles to be loaded
Trait Implementations§
source§impl AnyLayer for TilesLayer
impl AnyLayer for TilesLayer
source§impl Clone for TilesLayer
impl Clone for TilesLayer
source§fn clone(&self) -> TilesLayer
fn clone(&self) -> TilesLayer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TilesLayer
impl Debug for TilesLayer
source§impl<'de> Deserialize<'de> for TilesLayer
impl<'de> Deserialize<'de> for TilesLayer
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for TilesLayer
impl PartialEq for TilesLayer
source§fn eq(&self, other: &TilesLayer) -> bool
fn eq(&self, other: &TilesLayer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TilesLayer
impl Serialize for TilesLayer
source§impl TilemapLayer for TilesLayer
impl TilemapLayer for TilesLayer
type TileType = Tile
fn tiles(&self) -> &CompressedData<Array2<Self::TileType>, TilesLoadInfo>
fn tiles_mut( &mut self ) -> &mut CompressedData<Array2<Self::TileType>, TilesLoadInfo>
impl Eq for TilesLayer
impl StructuralEq for TilesLayer
impl StructuralPartialEq for TilesLayer
Auto Trait Implementations§
impl RefUnwindSafe for TilesLayer
impl Send for TilesLayer
impl Sync for TilesLayer
impl Unpin for TilesLayer
impl UnwindSafe for TilesLayer
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.