Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 138 bytes modified

beta.r3js.org
-=yb4f310 2018-03-19 11:26:42 +01:00
parent 621d1db30b
commit 14af347d26
1 changed files with 10 additions and 2 deletions

View File

@ -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');
this.mesh.updateInstance('rotation'); if (!this.isTail) {
this.mesh.updateInstance('rotation');
}
} }
GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) { GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {