Code cleanup

This commit is contained in:
Jeremiah Billmann
2013-07-09 21:46:23 -04:00
parent 39751c8044
commit 997afd00f1
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
var Entity = require('../entities/entity');
var entity = require('../entities/entity');
exports = module.exports = EntityController;
@@ -19,7 +19,7 @@ EntityController.prototype = {
});
if (!entityFound) {
newEntity = new Entity(id);
newEntity = new entity(id);
this.entities.push(newEntity);
}
return newEntity;
+5 -5
View File
@@ -1,13 +1,13 @@
var EntityController = require('./entitycontroller'),
Player = require('../entities/player');
var entityController = require('./entitycontroller'),
player = require('../entities/player');
exports = module.exports = PlayerController;
function PlayerController () {
EntityController.call(this);
entityController.call(this);
}
PlayerController.prototype = Object.create(EntityController.prototype);
PlayerController.prototype = Object.create(entityController.prototype);
PlayerController.prototype.add = function (client) {
var newPlayer, playerFound = false;
@@ -21,7 +21,7 @@ PlayerController.prototype.add = function (client) {
});
if (!playerFound) {
newPlayer = new Player(client);
newPlayer = new player(client);
this.entities.push(newPlayer);
}
return newPlayer;
+3 -3
View File
@@ -1,11 +1,11 @@
var Entity = require('./entity');
var entity = require('./entity');
exports = module.exports = Player;
function Player (client) {
Entity.call(this, client.id);
entity.call(this, client.id);
this.client = client;
this.inputs = [];
}
Player.prototype = Object.create(Entity.prototype);
Player.prototype = Object.create(entity.prototype);