#ifndef EXIT_DOOR_HPP
#define EXIT_DOOR_HPP

#include "godot_cpp/classes/animation_player.hpp"
#include <godot_cpp/classes/node3d.hpp>

namespace godot {
//! Listener for the all_keys_found Observer. Plays the "open" animation when the observer is broadcast.
class ExitDoor : public Node3D {
    GDCLASS(ExitDoor, Node3D);
    //! Required to be a valid godot class.
    static void _bind_methods();
public:
    //! Fetch animation player and connect to all_keys_found observer of RallyRushGameMode.
    virtual void _enter_tree() override;
    //! Listener for all_keys_found.
    void all_keys_found();
private:
    AnimationPlayer *player{nullptr};
};
}

#endif // !EXIT_DOOR_HPP
