mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added areaSensor to doll and not allowing client to update position when another player is nearby
This commit is contained in:
parent
e7f4b6043d
commit
b500ef436d
5 changed files with 78 additions and 18 deletions
|
|
@ -74,7 +74,14 @@ function (Parent, Item, Box2D, Nc) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Doll.prototype.updatePositionState = function(positionState) {
|
||||
if(!this.isAnotherPlayerNearby()) {
|
||||
this.body.SetAwake(true);
|
||||
this.body.SetPosition(positionState);
|
||||
}
|
||||
};
|
||||
|
||||
return Doll;
|
||||
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue