mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
feat: player.delete() function and update documentation
This commit is contained in:
parent
c1b311f3c4
commit
13c36f4629
6 changed files with 38 additions and 0 deletions
|
|
@ -36,6 +36,10 @@ Player* Players::create() {
|
|||
return player;
|
||||
}
|
||||
|
||||
void Players::remove(int64_t id) {
|
||||
players.erase(id);
|
||||
}
|
||||
|
||||
dv::value Players::serialize() const {
|
||||
auto root = dv::object();
|
||||
auto& list = root.list("players");
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ public:
|
|||
|
||||
Player* create();
|
||||
|
||||
void remove(int64_t id);
|
||||
|
||||
dv::value serialize() const override;
|
||||
|
||||
void deserialize(const dv::value& src) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue