mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-09-09 11:14:19 +08:00
Refactored "add state" for entities and players
This commit is contained in:
@@ -9,6 +9,10 @@ function Entity (id) {
|
||||
|
||||
Entity.prototype = {
|
||||
addState: function (state, executionTime) {
|
||||
this.addHistory(state, executionTime);
|
||||
this.sequence += 1;
|
||||
},
|
||||
addHistory: function (state, executionTime) {
|
||||
var minTime, spliceTo = 0;
|
||||
this.state = state;
|
||||
this.stateHistory.push({ state: state, executionTime: executionTime });
|
||||
|
||||
Reference in New Issue
Block a user