Files
GarageServer.IO/lib/entities/player.js
T
Jeremiah Billmann 65673598dc NPM Publish prep
2013-08-01 15:18:40 -04:00

17 lines
454 B
JavaScript

var entity = require('./entity');
exports = module.exports = Player;
function Player (client, maxHistorySecondBuffer) {
entity.call(this, client.id, maxHistorySecondBuffer);
this.client = client;
this.inputs = [];
}
Player.prototype = Object.create(entity.prototype);
Player.prototype.addState = function (state, executionTime) {
this.addHistory(state, executionTime);
this.sequence += this.inputs.length;
this.inputs = [];
};