17 APPLOG_TRACE(
"{}::{}", hpp::type_name_str(*
this), __func__);
18 auto& ev = ctx.get_cached<
events>();
36 action.on_end.connect([
this, &ctx, allow_splash]()
51 begin_play(ctx, allow_splash);
71 is_paused_ ? ev.on_pause(ctx) : ev.on_resume(ctx);
77 action.on_begin.connect([
this, &ctx]()
111void play_mode::begin_play(
rtti::context& ctx,
bool allow_splash)
116 const bool show_splash = allow_splash && should_show_splash(ctx);
139 ctx.
get_cached<simulation>().reset_delta_clock();
156 ev.on_play_after_end(ctx);
159auto play_mode::should_show_splash(
rtti::context& ctx)
const ->
bool
161 if(!ctx.
has<settings>())
165 const auto& splash = ctx.
get<settings>().splash;
std::chrono::duration< float > delta_t
#define APPLOG_TRACE(...)
auto queue(seq_action action, const seq_scope_policy &scope_policy, hpp::source_location location) -> seq_id_t
Queues a new action.
auto delay(const duration_t &duration, const sentinel_t &sentinel) -> seq_action
Creates a delay action.
void teardown(splash_scene_state &state)
auto is_finished(const splash_scene_state &state) -> bool
void update(rtti::context &ctx, splash_scene_state &state)
auto has_content(rtti::context &ctx) -> bool
void setup(rtti::context &ctx, scene &scn, splash_scene_state &state)
Manages the entity-component-system (ECS) operations for the ACE framework.
hpp::event< void(rtti::context &, delta_t)> on_frame_update
hpp::event< void(rtti::context &)> on_play_before_begin
engine play events
auto deinit(rtti::context &ctx) -> bool
void toggle(rtti::context &ctx, bool allow_splash=true)
void set_paused(rtti::context &ctx, bool paused)
void set_active(rtti::context &ctx, bool active, bool allow_splash=true)
auto init(rtti::context &ctx) -> bool
void skip_next_frame(rtti::context &ctx)
void toggle_pause(rtti::context &ctx)
void on_simulation_frame()
void on_frame_update(rtti::context &ctx, delta_t dt)
auto is_active() const -> bool