#ifndef EXIT_TRIGGER_HPP
#define EXIT_TRIGGER_HPP

#include <godot_cpp/classes/area3d.hpp>

namespace godot {
//! Area3D that notifies the RallyRushGameMode that the player has exited the game when hit by the CarPlayer. Only if the player has found exactly 3 keys.
class ExitTrigger : public Area3D {
    GDCLASS(ExitTrigger, Area3D);
    //! Required to be a valid godot class.
    static void _bind_methods();
public:
    //! Connect body_entered observer.
    virtual void _enter_tree() override;
    //! If the entered body is a CarPlayer and the player has found 3 keys, notify the RallyRushGameMode that the player finished the game.
    void body_entered(Node3D *node);
};
}

#endif // !EXIT_TRIGGER_HPP
