From 9fce9dd2c3cd1c0a75a5cfe74ea0484186247cc3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 28 Apr 2022 22:03:07 +0200 Subject: docs: add basic example --- examples/basic/src/enemy.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/basic/src/enemy.hpp (limited to 'examples/basic/src/enemy.hpp') diff --git a/examples/basic/src/enemy.hpp b/examples/basic/src/enemy.hpp new file mode 100644 index 0000000..ebf00c4 --- /dev/null +++ b/examples/basic/src/enemy.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include "interfaces/enemy.hpp" + +#include + +class Enemy : public IEnemy, public yacppdic::AutoWirable +{ +public: + int get_health() const noexcept override; + + void do_damage(int damage) noexcept override; + +private: + int _health = 120; +}; -- cgit v1.2.3-18-g5258