mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added getSpawnedPlayersAndTheirPositions in order to get already spawned players to spawn the moment you join and spawn yourself. fixes #26
This commit is contained in:
parent
a852bccae6
commit
a1e94e1ed0
6 changed files with 55 additions and 8 deletions
|
|
@ -1,4 +1,10 @@
|
|||
define(["Lib/Vendor/Box2D", "Game/Config/Settings", "Game/Core/Collision/Detector"], function (Box2D, Settings, CollisionDetector) {
|
||||
define([
|
||||
"Lib/Vendor/Box2D",
|
||||
"Game/Config/Settings",
|
||||
"Game/Core/Collision/Detector"
|
||||
],
|
||||
|
||||
function (Box2D, Settings, CollisionDetector) {
|
||||
|
||||
function Doll (physicsEngine, id) {
|
||||
this.id = id;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ function (Doll, Settings) {
|
|||
return this.doll.getBody();
|
||||
}
|
||||
|
||||
Player.prototype.getPosition = function () {
|
||||
return this.getBody().GetPosition();
|
||||
}
|
||||
|
||||
Player.prototype.setStanding = function (isStanding) {
|
||||
var resetStates = ['jump', 'jumploop'];
|
||||
if (resetStates.indexOf(this.currentAnimationState)>=0 && !this.standing && isStanding) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue