added stats + ping, fixed box2d step size

This commit is contained in:
Jeena 2013-12-09 14:00:46 +01:00
parent ffb7db528a
commit b4ef1203b1
8 changed files with 63 additions and 16 deletions

View file

@ -53,6 +53,11 @@ function (Parent, ProtocolHelper, NotificationCenter) {
NotificationCenter.trigger("user/controlCommand", this.id, message);
};
User.prototype.onPing = function(timestamp) {
var message = ProtocolHelper.encodeCommand("pong", timestamp);
NotificationCenter.trigger("user/" + this.socketLink.id + "/message", message);
};
return User;
});