mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added stats + ping, fixed box2d step size
This commit is contained in:
parent
ffb7db528a
commit
b4ef1203b1
8 changed files with 63 additions and 16 deletions
|
|
@ -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;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue