Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 686 bytes modified
parent
3835a29219
commit
eee408aae3
|
@ -1239,12 +1239,36 @@ GameLib.CustomCode.prototype.restore = function() {
|
|||
clone.mesh.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* --- works ---
|
||||
*/
|
||||
clone.mesh = clone.backupMesh;
|
||||
clone.backupMesh = null;
|
||||
clone.mesh.visible = true;
|
||||
clone.mesh.updateInstance('visible');
|
||||
clone.applyToMesh();
|
||||
clone.backupMesh = clone.mesh;
|
||||
/**
|
||||
* --- end of works ---
|
||||
*/
|
||||
|
||||
|
||||
if (body.orientation === GameLib.CustomCode.ORIENTATION_UP) {
|
||||
body.backupMesh.position.y += 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
|
||||
}
|
||||
|
||||
if (body.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
|
||||
body.backupMesh.position.y -= 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
|
||||
}
|
||||
|
||||
if (body.orientation === GameLib.CustomCode.ORIENTATION_LEFT) {
|
||||
body.backupMesh.position.x -= 0.5 * GameLib.CustomCode.BODY_SCALE_X;
|
||||
}
|
||||
|
||||
if (body.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
|
||||
body.backupMesh.position.x += 0.5 * GameLib.CustomCode.BODY_SCALE_X;
|
||||
}
|
||||
|
||||
|
||||
clone.mesh = this.createGameMesh(this.materialBreadCorner);
|
||||
|
||||
|
|
Loading…
Reference in New Issue