Kaynağa Gözat

Add ability to 'resume' from a pause state.

Sam Jaffe 6 yıl önce
ebeveyn
işleme
6354769822

+ 1 - 0
engine/include/game/engine/game_dispatch.hpp

@@ -41,6 +41,7 @@ namespace engine {
 
     void register_scene(scene_t scn);
     void activate_scene(scene_id_t const & id);
+    void set_current_timestamp();
 
   private:
     env::clock::tick next_frame();

+ 4 - 0
engine/src/game_dispatch.cpp

@@ -43,6 +43,10 @@ namespace engine {
     curr_scene = current_scene_info(scenes[id].get());
   }
 
+  void game_dispatch::set_current_timestamp() {
+    current_timestamp = env::clock::now();
+  }
+
   game_dispatch::current_scene_info::current_scene_info() {}
 
   game_dispatch::current_scene_info::current_scene_info(scene * curr)