pub enum CollisionResult {
Passable,
TileBlocked,
TilePairBlocked,
SpriteBlocked,
MapEdge,
LedgeJump,
WaterBlocked,
CounterTile,
StopSurfing,
}Expand description
Result of a collision check when the player tries to move.
Variants§
Passable
Movement is allowed — the target tile is clear.
TileBlocked
The tile itself is impassable (wall, obstacle, etc.).
TilePairBlocked
A tile pair collision prevents crossing (elevation difference).
SpriteBlocked
An NPC or other sprite is blocking the way.
MapEdge
The player is at the edge of the map (triggers map connection).
LedgeJump
The player should jump a ledge (special movement).
WaterBlocked
Cannot surf here (water tile but no surf).
CounterTile
Counter tile — can talk across but not walk onto.
StopSurfing
Movement is allowed and ends a surf: the surfer steps onto a passable land tile and returns to walking (CollisionCheckOnWater .stopSurfing).
Trait Implementations§
Source§impl Clone for CollisionResult
impl Clone for CollisionResult
Source§fn clone(&self) -> CollisionResult
fn clone(&self) -> CollisionResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CollisionResult
Source§impl Debug for CollisionResult
impl Debug for CollisionResult
impl Eq for CollisionResult
Source§impl PartialEq for CollisionResult
impl PartialEq for CollisionResult
impl StructuralPartialEq for CollisionResult
Auto Trait Implementations§
impl Freeze for CollisionResult
impl RefUnwindSafe for CollisionResult
impl Send for CollisionResult
impl Sync for CollisionResult
impl Unpin for CollisionResult
impl UnsafeUnpin for CollisionResult
impl UnwindSafe for CollisionResult
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