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