UI: Added widget focus for regular input blocking | Physics: Trigger callbacks

This commit is contained in:
2024-11-02 02:25:24 +01:00
parent cb55590e03
commit 9ae08a9278
7 changed files with 65 additions and 36 deletions

View File

@@ -36,6 +36,8 @@ Engine_Core :: struct {
procs: struct {
on_scene_loaded: (*Scene, Engine_Mode);
}
paused: bool;
}
engine: Engine_Core;
@@ -106,7 +108,7 @@ coven_run :: (game_update_proc: (float), game_update_post_physics_proc: (float))
if engine.mode == .PLAYING {
game_update_proc(clamped_dt);
if engine.current_scene != null {
if engine.current_scene != null && !engine.paused {
update_animators(clamped_dt);
update_physics(engine.current_scene, clamped_dt);
game_update_post_physics_proc(clamped_dt);
@@ -117,7 +119,9 @@ coven_run :: (game_update_proc: (float), game_update_post_physics_proc: (float))
update_transforms();
sync_engine_buffers();
update_particle_systems(clamped_dt);
if !engine.paused {
update_particle_systems(clamped_dt);
}
}
#if EDITOR {