mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
introduce local player
This commit is contained in:
parent
b5999fe364
commit
65fec4f4a9
16 changed files with 84 additions and 31 deletions
|
|
@ -14,6 +14,9 @@ class Level;
|
|||
class Player;
|
||||
|
||||
class Players : public Serializable {
|
||||
public:
|
||||
static inline int64_t NONE = -1;
|
||||
private:
|
||||
Level& level;
|
||||
std::unordered_map<int64_t, std::unique_ptr<Player>> players;
|
||||
|
||||
|
|
@ -23,7 +26,7 @@ public:
|
|||
|
||||
Player* get(int64_t id) const;
|
||||
|
||||
Player* create();
|
||||
Player* create(int64_t id=NONE);
|
||||
|
||||
void suspend(int64_t id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue