Skip to content

Instantly share code, notes, and snippets.

@hasyimibhar
Last active December 16, 2015 08:49
Show Gist options
  • Save hasyimibhar/5409050 to your computer and use it in GitHub Desktop.
Save hasyimibhar/5409050 to your computer and use it in GitHub Desktop.
void takeDamage(const int damage) {
assert(damage >= 0);
health -= damage;
if (health <= 0) {
// Do whatever a dead enemy should be doing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment