pub enum CollisionType {
Passable,
Impassable,
Ledge {
direction: u8,
},
Counter,
Grass(Option<u8>),
Water,
Warp,
Door,
}Expand description
Describes how a tile interacts with entities on the overworld map.
This is used by the movement and collision systems to determine whether the player or NPCs can walk on a tile, trigger special behaviour (ledges, grass encounters, doors), or are blocked.
Variants§
Passable
The tile can be walked on freely.
Impassable
The tile blocks all movement.
Ledge
A ledge tile that allows jumping down.
The direction field indicates which direction the player
faces when jumping (e.g., 0 = down).
Counter
A counter tile that the player can interact with from behind.
Grass(Option<u8>)
Tall grass where wild monster encounters can occur.
When Some(id), specifies a special grass tile ID for
encounter calculations. When None, uses the default
encounter rate.
Water
Water tile that requires Surf to traverse.
Warp
A warp tile that triggers a map transition.
Door
A door tile that can be entered.
Trait Implementations§
Source§impl Clone for CollisionType
impl Clone for CollisionType
Source§fn clone(&self) -> CollisionType
fn clone(&self) -> CollisionType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more