Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 129 bytes modified
parent
d2dbd76497
commit
77d3d0de62
|
@ -52,7 +52,8 @@ this.imagePatty = GameLib.EntityManager.Instance.findComponentById('4lf0fw24su
|
||||||
/**
|
/**
|
||||||
* Other Objects (Scene)
|
* Other Objects (Scene)
|
||||||
*/
|
*/
|
||||||
this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj');
|
this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj');
|
||||||
|
this.animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Game objects
|
* Game objects
|
||||||
|
@ -144,7 +145,9 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
}
|
}
|
||||||
this.mesh = mesh.clone();
|
this.mesh = mesh.clone();
|
||||||
this.mesh.useQuaternion = false;
|
this.mesh.useQuaternion = false;
|
||||||
|
|
||||||
|
this.animation.meshes.push(this.mesh);
|
||||||
|
|
||||||
if (GameLib.Utils.UndefinedOrNull(position)) {
|
if (GameLib.Utils.UndefinedOrNull(position)) {
|
||||||
position = {
|
position = {
|
||||||
x : Math.round(GameLib.CustomCode.GRID_WIDTH / 2),
|
x : Math.round(GameLib.CustomCode.GRID_WIDTH / 2),
|
||||||
|
@ -185,7 +188,7 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() {
|
||||||
/**
|
/**
|
||||||
* TODO: We don't update instance position - animation should do this
|
* TODO: We don't update instance position - animation should do this
|
||||||
*/
|
*/
|
||||||
this.mesh.updateInstance('position');
|
// this.mesh.updateInstance('position');
|
||||||
this.mesh.updateInstance('rotation');
|
this.mesh.updateInstance('rotation');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue