henrywangzh / Xinshen

Xinshen [SRS23]
3 stars 1 forks source link

[Programming:Enemy] Enemy Base Class (HP system) #29

Closed henrywangzh closed 1 year ago

henrywangzh commented 1 year ago

This task deals with the hp and damage of our enemies.

Specifically, we want the enemies to now also apply damage to the player if the attack hits.

Similarly, when the player hits the enemy, we want to also reduce the enemy's hp.

To start, we will have an Enemy base class and create HP and attack variables. Then, we can create functions for applying damage and taking damage.

We will want all enemies to use these functions, so once we finish implementing the base class, we will want to use these functions in the code for the other enemies.