34 lines
805 B
C++
34 lines
805 B
C++
#include "hitbox.h"
|
|
#include "health_status.h"
|
|
#include "macros.h"
|
|
|
|
void Hitbox::_bind_methods() {
|
|
BIND_HPROPERTY(Variant::OBJECT, health, PROPERTY_HINT_NODE_TYPE, "HealthStatus");
|
|
BIND_PROPERTY(Variant::FLOAT, damage_modifier);
|
|
BIND_HPROPERTY(Variant::OBJECT, impact_effect, PROPERTY_HINT_RESOURCE_TYPE, "PackedScene");
|
|
}
|
|
|
|
void Hitbox::set_health(HealthStatus *value) {
|
|
this->health = value;
|
|
}
|
|
|
|
HealthStatus *Hitbox::get_health() const {
|
|
return this->health;
|
|
}
|
|
|
|
void Hitbox::set_damage_modifier(float value) {
|
|
this->damage_modifier = value;
|
|
}
|
|
|
|
float Hitbox::get_damage_modifier() const {
|
|
return this->damage_modifier;
|
|
}
|
|
|
|
void Hitbox::set_impact_effect(Ref<PackedScene> effect) {
|
|
this->impact_effect = effect;
|
|
}
|
|
|
|
Ref<PackedScene> Hitbox::get_impact_effect() const {
|
|
return this->impact_effect;
|
|
}
|