Module pix_engine::state::environment
source · Expand description
Environment methods for the Engine
.
Methods for reading and setting various engine environment values.
Provided PixState
methods:
PixState::focused
: Whether the current window target has focus.PixState::delta_time
: Duration elapsed since last frame.PixState::elapsed
: Duration elapsed since application start.PixState::frame_count
: Total number of frames since application start.PixState::redraw
: Run render loop 1 time, callingPixEngine::on_update
.PixState::run_times
: Run render loop N times, callingPixEngine::on_update
.PixState::avg_frame_rate
: Average frames per second rendered.PixState::quit
: Trigger application quit.PixState::abort_quit
: Abort application quit.PixState::day
: Return the current day between 1-31.PixState::month
: Return the current month between 1-12.PixState::year
: Return the current year as an integer.PixState::hour
: Return the current hour between 0-23.PixState::minute
: Return the current minute between 0-59.PixState::second
: Return the current second between 0-59.