A pluggable platforming controller for game-toolkit: fluid, snappy movement (jump buffer, coyote time, wall jumps, dashes, climbing, rolls, ...) with presets, and an animation state graph that follows it.
//! [`CustomTile`]: what a [`Tile::Custom`](super::Tile::Custom) is to the movement, set
//! per id with [`Level::define`](super::Level::define).
usesuper::{Hold, Surface};/// How the movement treats one kind of custom tile. The default is air.
#[derive(Clone, Copy, Debug, Default, PartialEq)]pubstructCustomTile{/// Whether and how it holds the character.
pubhold: Hold,
/// The surface it is, when it holds the character (solid or a platform).
pubsurface: Surface,
}implCustomTile{/// A solid tile with `surface`.
pubconstfnsolid(surface: Surface)->Self{Self{
hold:Hold::Solid,
surface,}}/// A one-way platform with `surface`: a bouncy, icy or moving-belt ledge.
pubconstfnplatform(surface: Surface)->Self{Self{
hold:Hold::Platform,
surface,}}}