feat: implemented damage to enemies
This commit is contained in:
parent
70696db134
commit
2cd1cba04f
9 changed files with 163 additions and 21 deletions
22
modules/wave_survival/hitbox.h
Normal file
22
modules/wave_survival/hitbox.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef HITBOX_H
|
||||
#define HITBOX_H
|
||||
|
||||
#include "scene/3d/physics/area_3d.h"
|
||||
class HealthStatus;
|
||||
|
||||
class Hitbox : public Area3D {
|
||||
GDCLASS(Hitbox, Area3D);
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void set_health(HealthStatus *value);
|
||||
HealthStatus *get_health() const;
|
||||
void set_damage_modifier(float value);
|
||||
float get_damage_modifier() const;
|
||||
|
||||
private:
|
||||
HealthStatus *health{ nullptr };
|
||||
float damage_modifier{ 1.f };
|
||||
};
|
||||
|
||||
#endif // !HITBOX_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue