diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-28 22:03:07 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-04-28 22:03:34 +0200 |
commit | 9fce9dd2c3cd1c0a75a5cfe74ea0484186247cc3 (patch) | |
tree | 37184c6a8a5d94863a23e053631756f738b75bee /examples/basic/src/enemy.cpp | |
parent | 1f97ab2ef846462d7a599fbd3ac9415da8f0953b (diff) |
docs: add basic examplev0.1.0
Diffstat (limited to 'examples/basic/src/enemy.cpp')
-rw-r--r-- | examples/basic/src/enemy.cpp | 11 |
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; +} |