|
Unravel Engine C++ Reference
|
Owns play-mode state and orchestrates the splash -> running lifecycle. More...
#include <play_mode.h>
Public Types | |
| enum class | phase { inactive , splash , running } |
Public Member Functions | |
| auto | init (rtti::context &ctx) -> bool |
| auto | deinit (rtti::context &ctx) -> bool |
| void | toggle (rtti::context &ctx, bool allow_splash=true) |
| void | set_active (rtti::context &ctx, bool active, bool allow_splash=true) |
| void | set_paused (rtti::context &ctx, bool paused) |
| void | toggle_pause (rtti::context &ctx) |
| void | skip_next_frame (rtti::context &ctx) |
| void | on_frame_update (rtti::context &ctx, delta_t dt) |
| auto | is_active () const -> bool |
| auto | is_simulation_running () const -> bool |
| auto | is_splash () const -> bool |
| auto | is_paused () const -> bool |
| auto | frames_running () const -> uint64_t |
| void | on_simulation_frame () |
| auto | current_phase () const -> phase |
Owns play-mode state and orchestrates the splash -> running lifecycle.
Definition at line 16 of file play_mode.h.
|
strong |
| Enumerator | |
|---|---|
| inactive | |
| splash | |
| running | |
Definition at line 18 of file play_mode.h.
|
inlinenodiscard |
Definition at line 63 of file play_mode.h.
| auto unravel::play_mode::deinit | ( | rtti::context & | ctx | ) | -> bool |
Definition at line 23 of file play_mode.cpp.
|
inlinenodiscard |
Definition at line 56 of file play_mode.h.
| auto unravel::play_mode::init | ( | rtti::context & | ctx | ) | -> bool |
Definition at line 15 of file play_mode.cpp.
|
inlinenodiscard |
Definition at line 36 of file play_mode.h.
|
inlinenodiscard |
Definition at line 51 of file play_mode.h.
|
inlinenodiscard |
Definition at line 41 of file play_mode.h.
|
inlinenodiscard |
Definition at line 46 of file play_mode.h.
| void unravel::play_mode::on_frame_update | ( | rtti::context & | ctx, |
| delta_t | dt ) |
Definition at line 97 of file play_mode.cpp.
| void unravel::play_mode::on_simulation_frame | ( | ) |
Definition at line 169 of file play_mode.cpp.
| void unravel::play_mode::set_active | ( | rtti::context & | ctx, |
| bool | active, | ||
| bool | allow_splash = true ) |
Definition at line 43 of file play_mode.cpp.
| void unravel::play_mode::set_paused | ( | rtti::context & | ctx, |
| bool | paused ) |
Definition at line 59 of file play_mode.cpp.
| void unravel::play_mode::skip_next_frame | ( | rtti::context & | ctx | ) |
Definition at line 84 of file play_mode.cpp.
| void unravel::play_mode::toggle | ( | rtti::context & | ctx, |
| bool | allow_splash = true ) |
Definition at line 33 of file play_mode.cpp.
| void unravel::play_mode::toggle_pause | ( | rtti::context & | ctx | ) |
Definition at line 74 of file play_mode.cpp.