mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-08-02 12:20:49 +08:00
Progress of #3
This commit is contained in:
@@ -125,15 +125,19 @@ GarageServer.prototype.updatePlayerState = function (id, state) {
|
||||
};
|
||||
|
||||
GarageServer.prototype.addEntity = function (id) {
|
||||
this.game.addEntity(id);
|
||||
};
|
||||
|
||||
GarageServer.prototype.removeEntity = function (id) {
|
||||
this.game.removeEntity(id);
|
||||
};
|
||||
|
||||
GarageServer.prototype.updateEntityState = function (id, state) {
|
||||
|
||||
};
|
||||
|
||||
GarageServer.prototype.getEntities = function () {
|
||||
return this.game.getEntities();
|
||||
};
|
||||
|
||||
exports.createGarageServer = function (io, options) {
|
||||
|
||||
@@ -47,6 +47,10 @@ GarageServerGame.prototype.getPlayers = function () {
|
||||
return this.playerController.entities;
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.getEntities = function () {
|
||||
return this.entityController.entities;
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.getPlayer = function (id) {
|
||||
var playerFound;
|
||||
|
||||
@@ -80,6 +84,14 @@ GarageServerGame.prototype.removePlayer = function (id) {
|
||||
this.playerController.remove(id);
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.addEntity = function (id) {
|
||||
this.entityController.add(id);
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.removeEntity = function (id) {
|
||||
this.entityController.remove(id);
|
||||
};
|
||||
|
||||
GarageServerGame.prototype.setPlayerState = function (id, state) {
|
||||
this.playerController.setState(id, state);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user