#include "shield_powerup.hpp"
#include "enemy_car.hpp"
#include "utils/godot_macros.h"

namespace godot {
void ShieldPowerup::_bind_methods() {
#define CLASSNAME ShieldPowerup
}

void ShieldPowerup::_enter_tree() { GDGAMEONLY();
    this->connect("body_entered", callable_mp(this, &ShieldPowerup::body_entered));
}

void ShieldPowerup::body_entered(Node3D *body) {
    EnemyCar *car = Object::cast_to<EnemyCar>(body);
    if(car) car->damage();
}
}
