Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 617 bytes modified
parent
c1b1ceea2b
commit
1a0a7043dd
|
@ -1232,6 +1232,24 @@ GameLib.CustomCode.prototype.restore = function() {
|
|||
var clone = body.clone();
|
||||
|
||||
if (clone.backupMesh) {
|
||||
|
||||
|
||||
if (clone.orientation === GameLib.CustomCode.ORIENTATION_UP) {
|
||||
clone.backupMesh.position.y -= 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
|
||||
}
|
||||
|
||||
if (clone.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
|
||||
clone.backupMesh.position.y += 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
|
||||
}
|
||||
|
||||
if (clone.orientation === GameLib.CustomCode.ORIENTATION_LEFT) {
|
||||
clone.backupMesh.position.x += 0.5 * GameLib.CustomCode.BODY_SCALE_X;
|
||||
}
|
||||
|
||||
if (clone.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
|
||||
clone.backupMesh.position.x -= 0.5 * GameLib.CustomCode.BODY_SCALE_X;
|
||||
}
|
||||
|
||||
clone.backupMesh.visible = true;
|
||||
clone.backupMesh.updateInstance('visible');
|
||||
|
||||
|
|
Loading…
Reference in New Issue