Created
April 25, 2013 04:26
-
-
Save hasyimibhar/5457498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void take_damage( | |
const Enemy *enemy, | |
int damage) { | |
enemy->health -= damage; | |
if (enemy->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