Type Definition eos_rs::api::dungeon_mode::DungeonTile
source · pub type DungeonTile = tile;
Expand description
A struct representing a single dungeon tile.
Implementations§
source§impl DungeonTile
impl DungeonTile
Important safety note
Please see the safety note of DungeonEntity
. It also applies to this impl.
sourcepub fn get_terrain(&self) -> Option<TerrainType>
pub fn get_terrain(&self) -> Option<TerrainType>
Gets the terrain type of a tile. Returns None if the terrain type is invalid.
sourcepub fn set_terrain_obstacle_checked(
&mut self,
secondary_terrain: bool,
room_index: u8
)
pub fn set_terrain_obstacle_checked( &mut self, secondary_terrain: bool, room_index: u8 )
Set the terrain of a specific tile to be an obstacle (wall or secondary terrain).
If secondary_terrain
is true, secondary terrain will be placed, otherwise wall.
Secondary terrain (water/lava) can only be placed in the specified room. If the tile room index does not match, a wall will be placed instead.
sourcepub fn set_secondary_terrain_on_wall(&mut self)
pub fn set_secondary_terrain_on_wall(&mut self)
Set a specific tile to have secondary terrain (water/lava), but only if it’s a passable wall.
sourcepub fn bind_trap(&mut self, trap: &mut DungeonEntity, is_visible: bool)
pub fn bind_trap(&mut self, trap: &mut DungeonEntity, is_visible: bool)
Sets this tile’s associated object to be the given trap, and sets the visibility of the trap.