#ifndef KEY_PICKUP_HPP
#define KEY_PICKUP_HPP

#include "godot_cpp/classes/area3d.hpp"

namespace godot {
//! Area3D that notifies the RallyRushGameMode and destroys itself when the player enters it.
class KeyPickup : public Area3D {
    GDCLASS(KeyPickup, Area3D);
    //! Required to be a valid godot class.
    static void _bind_methods();
public:
    //! Connect body_entered observer.
    virtual void _enter_tree() override;
protected:
    //! Notify RallyRushGameMode that a key is found and destroy, if the entered node is a CarPlayer.
    void body_entered(Node *node);
};
}

#endif // !KEY_PICKUP_HPP
