2024-03-13 15:08:37 +00:00
|
|
|
#ifndef UTILS_PLAYER_HPP
|
|
|
|
#define UTILS_PLAYER_HPP
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <optional>
|
2024-04-16 09:44:58 +00:00
|
|
|
#include <godot_cpp/variant/transform3d.hpp>
|
|
|
|
|
2024-03-13 15:08:37 +00:00
|
|
|
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;
|
2024-04-16 09:44:58 +00:00
|
|
|
virtual void spawn_at_position(Transform3D const &at) = 0;
|
2024-03-13 15:08:37 +00:00
|
|
|
|
|
|
|
uint32_t get_player_id();
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::optional<uint32_t> player_id{std::nullopt};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // !UTILS_PLAYER_HPP
|
|
|
|
|