mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
implemented gameobject for tiles and doll
This commit is contained in:
parent
fe0d4a66e2
commit
d51c705c1c
15 changed files with 221 additions and 326 deletions
|
|
@ -127,7 +127,6 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
}
|
||||
|
||||
GameController.prototype.onJoinMe = function (playerId) {
|
||||
//this.onSpawnPlayer(options);
|
||||
this.me = this.players[playerId];
|
||||
this.me.setPlayerController(new PlayerController(this.me));
|
||||
this.view.setMe(this.me);
|
||||
|
|
@ -140,15 +139,11 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
|
||||
var player = this.players[playerId];
|
||||
player.spawn(x, y);
|
||||
|
||||
// add to view controller
|
||||
this.view.addPlayer(player);
|
||||
this.gameObjects.animated.push(player.getDoll());
|
||||
}
|
||||
|
||||
GameController.prototype.loadLevel = function (path) {
|
||||
Parent.prototype.loadLevel.call(this, path);
|
||||
var tiles = this.level.levelObject.tiles;
|
||||
this.view.loadMeshes(tiles);
|
||||
}
|
||||
|
||||
return GameController;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue