# Rally Rush: src/weapon_pickup.hpp Source File

Loading...
Searching...
No Matches
weapon_pickup.hpp
Go to the documentation of this file.
#ifndef WEAPON_PICKUP_HPP
#define WEAPON_PICKUP_HPP
#include "godot_cpp/classes/area3d.hpp"
#include "godot_cpp/classes/random_number_generator.hpp"
namespace godot {
class WeaponPickup : public Area3D {
GDCLASS(WeaponPickup, Area3D);
static void _bind_methods();
public:
virtual void _enter_tree() override;
void body_entered(Node3D *node);
private:
RandomNumberGenerator rng;
};
}
#endif // !WEAPON_PICKUP_HPP
godot::WeaponPickup
Item box that can be found around the map. Triggers a pickup on the player when hit.
Definition weapon_pickup.hpp:9
godot::WeaponPickup::body_entered
void body_entered(Node3D *node)
If entered node is a CarPlayer, select a random pickup and activate it.
Definition weapon_pickup.cpp:15
godot::WeaponPickup::GDCLASS
GDCLASS(WeaponPickup, Area3D)
godot::WeaponPickup::_bind_methods
static void _bind_methods()
required to be a valid godot class
Definition weapon_pickup.cpp:7
godot::WeaponPickup::_enter_tree
virtual void _enter_tree() override
connect body entered observer
Definition weapon_pickup.cpp:11
godot::WeaponPickup::rng
RandomNumberGenerator rng
Definition weapon_pickup.hpp:19
godot
Definition beacon_powerup.cpp:6