Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 138 bytes modified
parent
621d1db30b
commit
14af347d26
|
@ -138,7 +138,8 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
position,
|
position,
|
||||||
orientation,
|
orientation,
|
||||||
flip,
|
flip,
|
||||||
backupMesh
|
backupMesh,
|
||||||
|
isTail
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (GameLib.Utils.UndefinedOrNull(mesh)) {
|
if (GameLib.Utils.UndefinedOrNull(mesh)) {
|
||||||
|
@ -170,6 +171,11 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
}
|
}
|
||||||
this.backupMesh = backupMesh;
|
this.backupMesh = backupMesh;
|
||||||
|
|
||||||
|
if (GameLib.Utils.UndefinedOrNull(isTail)) {
|
||||||
|
isTail = false;
|
||||||
|
}
|
||||||
|
this.isTail = isTail;
|
||||||
|
|
||||||
this.applyToMesh();
|
this.applyToMesh();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -190,7 +196,9 @@ 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');
|
||||||
|
if (!this.isTail) {
|
||||||
this.mesh.updateInstance('rotation');
|
this.mesh.updateInstance('rotation');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {
|
GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {
|
||||||
|
|
Loading…
Reference in New Issue