25 lines
484 B
C++
25 lines
484 B
C++
#pragma once
|
|
|
|
#include "break_utopia/macros.h"
|
|
#include "scene/3d/physics/animatable_body_3d.h"
|
|
|
|
class HitBox : public AnimatableBody3D {
|
|
GDCLASS(HitBox, AnimatableBody3D);
|
|
static void _bind_methods();
|
|
|
|
public:
|
|
void damage(int level);
|
|
|
|
private:
|
|
int defense{ 1 };
|
|
bool destroyed{ false };
|
|
|
|
public:
|
|
GET_SET_FNS(int, defense);
|
|
|
|
public:
|
|
virtual void damaged(int level) {}
|
|
GDVIRTUAL1(_damaged, int);
|
|
virtual void damage_blocked(int level) {}
|
|
GDVIRTUAL1(_damage_blocked, int);
|
|
};
|