public void SetHidden() { SliceMeshSides.SetHidden(); SliceMeshSides.SliceMeshTop.SetHidden(); SliceMeshSides.SliceMeshLiquids.SetHidden(); Map.SetSliceHidden(this); }
public void SetGhosted() { SliceMeshSides.SetGhosted(); SliceMeshSides.SliceMeshTop.SetGhosted(); SliceMeshSides.SliceMeshLiquids.SetGhosted(); Map.SetSliceGhosted(this); }
// Camera visibility based on gameObject.layer public void SetVisible() { SliceMeshSides.SetVisible(); SliceMeshSides.SliceMeshTop.SetVisible(); SliceMeshSides.SliceMeshLiquids.SetVisible(); Map.SetSliceVisible(this); }
private SliceMeshSides CreateSliceMesh(Slice slice, int x, int y, int z) { GameObject sliceMeshObject = Instantiate(sliceMeshPrefab, new Vector3(x, y, z), Quaternion.Euler(Vector3.zero), transform) as GameObject; sliceMeshObject.name = x.ToString() + ", " + y.ToString() + ", " + z.ToString(); SliceMeshSides sliceMesh = sliceMeshObject.GetComponentInChildren <SliceMeshSides>(); sliceMesh.SetSlice(slice); return(sliceMesh); }
} // For real world position, which matches x,y,z in Slices[,,]. public void SetSliceMeshSides(SliceMeshSides sides) { SliceMeshSides = sides; }