Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 372 bytes modified
parent
ac6cddc2d4
commit
cf11a460ca
|
@ -1232,10 +1232,23 @@ GameLib.CustomCode.prototype.restore = function() {
|
|||
var clone = body.clone();
|
||||
|
||||
if (clone.backupMesh) {
|
||||
|
||||
if (clone.mesh) {
|
||||
clone.mesh.geometry = null;
|
||||
clone.mesh.materials = null;
|
||||
clone.mesh.remove();
|
||||
}
|
||||
|
||||
clone.mesh = clone.backupMesh;
|
||||
clone.mesh.visible = true;
|
||||
clone.mesh.updateInstance('visible');
|
||||
clone.applyToMesh();
|
||||
|
||||
clone.mesh = this.createGameMesh(this.materialBreadCorner);
|
||||
clone.mesh.rotation.z = clone.orientation * Math.PI / 2;
|
||||
clone.mesh.rotation.z += ((Math.PI / 2) * clone.flip);
|
||||
clone.mesh.updateInstance('rotation');
|
||||
|
||||
} else {
|
||||
clone.mesh.visible = true;
|
||||
clone.mesh.updateInstance('visible');
|
||||
|
|
Loading…
Reference in New Issue