mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
add player name
This commit is contained in:
parent
97a4741a73
commit
acc4d2540d
6 changed files with 50 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ struct CursorSelection {
|
|||
class Player : public Serializable {
|
||||
Level* level;
|
||||
int64_t id;
|
||||
std::string name;
|
||||
float speed;
|
||||
int chosenSlot;
|
||||
glm::vec3 position;
|
||||
|
|
@ -63,6 +64,7 @@ public:
|
|||
Player(
|
||||
Level* level,
|
||||
int64_t id,
|
||||
const std::string& name,
|
||||
glm::vec3 position,
|
||||
float speed,
|
||||
std::shared_ptr<Inventory> inv,
|
||||
|
|
@ -100,9 +102,12 @@ public:
|
|||
|
||||
entityid_t getSelectedEntity() const;
|
||||
|
||||
void setName(const std::string& name);
|
||||
const std::string& getName() const;
|
||||
|
||||
const std::shared_ptr<Inventory>& getInventory() const;
|
||||
|
||||
glm::vec3 getPosition() const {
|
||||
const glm::vec3& getPosition() const {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue