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.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/basic/src/enemy.cpp (limited to 'examples/basic/src/enemy.cpp') 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; +} -- cgit v1.2.3-18-g5258