start fix tetris again
parent
2bc511a614
commit
5e6fc54181
|
@ -106,6 +106,15 @@ GameLib.System.Animation.prototype.instanceCreated = function(data) {
|
||||||
this.textures[data.component.id] = data.component;
|
this.textures[data.component.id] = data.component;
|
||||||
this.textureIds = Object.keys(this.textures);
|
this.textureIds = Object.keys(this.textures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.component instanceof GameLib.D3.Animation) {
|
||||||
|
this.animations[data.component.id] = data.component;
|
||||||
|
data.component.meshes.map(
|
||||||
|
function(mesh){
|
||||||
|
this.attachAnimation(data.component, mesh)
|
||||||
|
}.bind(this)
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.System.Animation.prototype.removeComponent = function(data) {
|
GameLib.System.Animation.prototype.removeComponent = function(data) {
|
||||||
|
@ -120,6 +129,17 @@ GameLib.System.Animation.prototype.removeComponent = function(data) {
|
||||||
this.textureIds = Object.keys(this.textures);
|
this.textureIds = Object.keys(this.textures);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.component instanceof GameLib.D3.Animation) {
|
||||||
|
|
||||||
|
data.component.meshes.map(
|
||||||
|
function(mesh){
|
||||||
|
this.detachAnimation(mesh)
|
||||||
|
}.bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
delete this.animations[data.component.id];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.System.Animation.prototype.textureAnimatedChange = function(data) {
|
GameLib.System.Animation.prototype.textureAnimatedChange = function(data) {
|
||||||
|
|
Loading…
Reference in New Issue