first try of rendering chuck as a texture

This commit is contained in:
Jeena 2013-11-30 14:39:02 +01:00
parent 86005c8b16
commit 1f55cdff2d
4 changed files with 38 additions and 11 deletions

View file

@ -113,7 +113,7 @@ function (Box2D, Parent, PhysicsEngine, ViewController, PlayerController, Notifi
//this.onSpawnPlayer(options);
this.me = this.players[playerId];
this.me.setPlayerController(new PlayerController(this.me));
this.viewController.setPlayer(this.me);
this.viewController.setMainPlayer(this.me);
}
GameController.prototype.onSpawnPlayer = function(options) {
@ -123,6 +123,9 @@ function (Box2D, Parent, PhysicsEngine, ViewController, PlayerController, Notifi
var player = this.players[playerId];
player.spawn(x, y);
// add to view controller
this.viewController.addMovablePlayer(player);
}
GameController.prototype.loadLevel = function (path) {