godot-cpp-utils/player.hpp

25 lines
410 B
C++

#ifndef UTILS_PLAYER_HPP
#define UTILS_PLAYER_HPP
#include <cstdint>
#include <optional>
namespace godot {
class PlayerInput;
class Node;
class IPlayer {
friend class GameRoot;
public:
virtual void setup_player_input(PlayerInput *input) = 0;
virtual Node *to_node() = 0;
uint32_t get_player_id();
private:
std::optional<uint32_t> player_id{std::nullopt};
};
}
#endif // !UTILS_PLAYER_HPP