Added spawning gameCommand logic

This commit is contained in:
Logsol 2013-01-05 08:19:49 +01:00
parent 371592f167
commit fb5de522e5
8 changed files with 84 additions and 59 deletions

View file

@ -5,31 +5,23 @@ define([
function (Doll, Settings) {
function Player (id, physicsEngine, repository) {
function Player (id, physicsEngine) {
this.physicsEngine = physicsEngine;
this.id = id;
this.repository = repository;
this.standing = false;
this.doll;
this.mc;
this.currentAnimationState = 'stand';
this.lookDirection = 1;
this.moveDirection = 0;
this.isSpawned = false;
this.init(id);
}
Player.prototype.init = function (id) {
this.doll = new Doll(this.physicsEngine, id);
//this.mc = EmbedHandler.load(EmbedHandler.CHUCK);
//this.mc.stop();
//var mclp = new MovieClipLabelParser();
//mclp.parse(this.mc);
}
Player.prototype.spawn = function (x, y) {
//this.repository.createModel(this.mc, this.doll.getBody());
this.doll = new Doll(this.physicsEngine, this.id);
this.doll.spawn(x, y);
this.isSpawned = true;
}
Player.prototype.getDoll = function () {
@ -113,8 +105,6 @@ function (Doll, Settings) {
return;
}
//this.mc.gotoAndPlay(type);
this.currentAnimationState = type;
}