Progress of #3

This commit is contained in:
Jeremiah Billmann
2013-07-13 22:11:45 -04:00
parent 0d97d35a4b
commit 08869d878e
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -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) {
+12
View File
@@ -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);
};