]> git.lizzy.rs Git - dungeon_game.git/blobdiff - plugins/game/game.h
Add globalsteps
[dungeon_game.git] / plugins / game / game.h
index cdca0b4e6eb12cb44aa06ba60933aba5d29b4a43..7ae93448e743513429deacb41663579db029b510 100644 (file)
@@ -74,6 +74,12 @@ struct input_handler
        void (*callback)();
 };
 
+struct globalstep
+{
+       bool run_if_dead;
+       void (*callback)(double dtime);
+};
+
 enum direction
 {
        UP,
@@ -120,5 +126,6 @@ void add_health(struct entity *entity, int health);
 void register_air_function(struct generator_function func);
 void register_input_handler(unsigned char c, struct input_handler handler);
 void register_render_component(void (*callback)(struct winsize ws));
+void register_globalstep(struct globalstep step);
 
 #endif