Hey everybody,
So I have a situation where the player object is attacking the enemy object. My question is, in terms of best practices, should the player hit the enemy, and the enemy detect if it was hit and then deduct it's own health, or should the player deduct the health of the enemy? I know that in OOP every class should handle it's own behavior, but I'm not sure what the correct answer of this question is. Also, could anyone point me to good articles on how to take advantage of OOP in terms of game programming? I want to write the best code I can.
Thanks!
↧