hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/state.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-14 00:02:01 +0200
committerhachem <im@hachem.wtf>2025-08-14 00:02:01 +0200
commit1b251bd174527951eec220ecbcb7eca89328e5b8 (patch)
treec47632a340b4cbdd97812f8c92798fc36146558c /src/core/state.h
parent1ac0f136629ce4046a5f6529cf3d1e51e96df408 (diff)
feat: state manager
Diffstat (limited to 'src/core/state.h')
-rw-r--r--src/core/state.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/state.h b/src/core/state.h
new file mode 100644
index 0000000..f5d808a
--- /dev/null
+++ b/src/core/state.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "event.h"
+
+namespace Donut
+{
+ class State
+ {
+ public:
+ virtual ~State() = default;
+
+ virtual void on_enter() = 0;
+ virtual void on_exit() = 0;
+ virtual void on_update(float delta_time) = 0;
+ virtual void on_render() = 0;
+ virtual void on_event(Event& event) = 0;
+ };
+};