# Rally Rush: src/beacon_powerup.hpp Source File

Loading...
Searching...
No Matches
beacon_powerup.hpp
Go to the documentation of this file.
#ifndef BEACON_POWERUP_HPP
#define BEACON_POWERUP_HPP
#include "godot_cpp/templates/vector.hpp"
#include "turret.hpp"
#include <godot_cpp/classes/area3d.hpp>
namespace godot {
class BeaconPowerup : public Area3D {
GDCLASS(BeaconPowerup, Area3D);
static void _bind_methods();
public:
virtual void _enter_tree() override;
virtual void _exit_tree() override;
void body_entered(Node3D *node);
private:
Vector<Turret*> affected{};
};
}
#endif // !BEACON_POWERUP_HPP
godot::BeaconPowerup
Area3D that inverts the attack classes of any turret object that it comes into contact with....
Definition beacon_powerup.hpp:10
godot::BeaconPowerup::_bind_methods
static void _bind_methods()
Required to be a valid godot class.
Definition beacon_powerup.cpp:7
godot::BeaconPowerup::_enter_tree
virtual void _enter_tree() override
Connect body_entered observer.
Definition beacon_powerup.cpp:9
godot::BeaconPowerup::GDCLASS
GDCLASS(BeaconPowerup, Area3D)
godot::BeaconPowerup::affected
Vector< Turret * > affected
Definition beacon_powerup.hpp:23
godot::BeaconPowerup::body_entered
void body_entered(Node3D *node)
If entered body is a turret, invert targets.
Definition beacon_powerup.cpp:19
godot::BeaconPowerup::_exit_tree
virtual void _exit_tree() override
Reset affected turrets.
Definition beacon_powerup.cpp:13
godot
Definition beacon_powerup.cpp:6
turret.hpp