nightshade-api 0.51.0

Procedural high level API for the nightshade game engine
Documentation
//! Game time: the timers a game ticks itself and the global clock it scales or
//! pauses.
//!
//! [`Timer`] and [`Stopwatch`] are plain data. Store one in your own component or
//! resource, advance it each frame with [`delta_time`](crate::prelude::delta_time),
//! and read its progress. A [`Timer`] counts toward a duration once or on a
//! repeat; a [`Stopwatch`] counts up without end. Both survive a save round trip.
//!
//! ```ignore
//! let mut spawn = Timer::repeating(2.0);
//! // each frame:
//! if spawn.tick(delta_time(world)).just_finished() {
//!     spawn_enemy(world);
//! }
//! ```
//!
//! The global clock is one multiplier on the frame's delta time.
//! [`set_time_scale`] drives slow motion or fast forward, [`pause`] and
//! [`unpause`] stop and resume it, and every timer ticked with
//! [`delta_time`](crate::prelude::delta_time) follows along. Work that should
//! ignore the scale, such as a pause menu animation, ticks with
//! [`real_delta_time`](crate::prelude::real_delta_time) instead.

pub use nightshade::prelude::{
    Stopwatch, Timer, TimerMode, is_paused, pause, set_paused, set_time_scale, time_scale, unpause,
};