Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 138 bytes modified
parent
621d1db30b
commit
14af347d26
|
@ -138,7 +138,8 @@ GameLib.CustomCode.SnakeBody = function(
|
|||
position,
|
||||
orientation,
|
||||
flip,
|
||||
backupMesh
|
||||
backupMesh,
|
||||
isTail
|
||||
) {
|
||||
|
||||
if (GameLib.Utils.UndefinedOrNull(mesh)) {
|
||||
|
@ -170,6 +171,11 @@ GameLib.CustomCode.SnakeBody = function(
|
|||
}
|
||||
this.backupMesh = backupMesh;
|
||||
|
||||
if (GameLib.Utils.UndefinedOrNull(isTail)) {
|
||||
isTail = false;
|
||||
}
|
||||
this.isTail = isTail;
|
||||
|
||||
this.applyToMesh();
|
||||
};
|
||||
|
||||
|
@ -190,8 +196,10 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() {
|
|||
* TODO: We don't update instance position - animation should do this
|
||||
*/
|
||||
// this.mesh.updateInstance('position');
|
||||
if (!this.isTail) {
|
||||
this.mesh.updateInstance('rotation');
|
||||
}
|
||||
}
|
||||
|
||||
GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue