#ifndef TUNNELS_GAME_MODE_HPP
#define TUNNELS_GAME_MODE_HPP

#include "tunnels_player.hpp"
#include "utils/game_mode.hpp"
#include <godot_cpp/templates/vector.hpp>

namespace godot {
class TunnelsGameMode : public GameMode {
    GDCLASS(TunnelsGameMode, GameMode)
    static void _bind_methods();
public:
    virtual void _begin() override;

    void on_player_spawned(Node *player);

    TunnelsPlayer *get_player_instance() const;
    void register_player_character(CharacterActor *actor);
    void set_manual_character(CharacterActor *actor);
    void on_character_destroyed(CharacterActor *actor);
    Vector<CharacterActor*> const &get_player_characters() const;
private:
    TunnelsPlayer *player{nullptr};
    CharacterActor *manual_character{nullptr};
    Vector<CharacterActor*> player_characters{};
};
}

#endif // !TUNNELS_GAME_MODE_HPP
