aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/enemy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic/src/enemy.cpp')
-rw-r--r--examples/basic/src/enemy.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/basic/src/enemy.cpp b/examples/basic/src/enemy.cpp
new file mode 100644
index 0000000..b20a90d
--- /dev/null
+++ b/examples/basic/src/enemy.cpp
@@ -0,0 +1,11 @@
+#include "enemy.hpp"
+
+int Enemy::get_health() const noexcept
+{
+ return _health;
+}
+
+void Enemy::do_damage(int damage) noexcept
+{
+ _health -= damage;
+}