34 lines
581 B
C++
34 lines
581 B
C++
#pragma once
|
|
|
|
#include "break_utopia/macros.h"
|
|
#include "scene/3d/physics/area_3d.h"
|
|
|
|
class DamageBox : public Area3D {
|
|
GDCLASS(DamageBox, Area3D);
|
|
static void _bind_methods();
|
|
void on_body_entered(Node *node);
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
private:
|
|
int damage{ 1 };
|
|
|
|
public:
|
|
GET_SET_FNS(int, damage);
|
|
};
|
|
|
|
class EnemyDamageBox : public Area3D {
|
|
GDCLASS(EnemyDamageBox, Area3D);
|
|
static void _bind_methods();
|
|
void on_body_entered(Node *node);
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
private:
|
|
double damage{ 0.1 };
|
|
|
|
public:
|
|
GET_SET_FNS(double, damage);
|
|
};
|