예제 #1
0
 public void SetHidden()
 {
     SliceMeshSides.SetHidden();
     SliceMeshSides.SliceMeshTop.SetHidden();
     SliceMeshSides.SliceMeshLiquids.SetHidden();
     Map.SetSliceHidden(this);
 }
예제 #2
0
 public void SetGhosted()
 {
     SliceMeshSides.SetGhosted();
     SliceMeshSides.SliceMeshTop.SetGhosted();
     SliceMeshSides.SliceMeshLiquids.SetGhosted();
     Map.SetSliceGhosted(this);
 }
예제 #3
0
 // Camera visibility based on gameObject.layer
 public void SetVisible()
 {
     SliceMeshSides.SetVisible();
     SliceMeshSides.SliceMeshTop.SetVisible();
     SliceMeshSides.SliceMeshLiquids.SetVisible();
     Map.SetSliceVisible(this);
 }
예제 #4
0
    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);
    }
예제 #5
0
 }                                                          // For real world position, which matches x,y,z in Slices[,,].
 public void SetSliceMeshSides(SliceMeshSides sides)
 {
     SliceMeshSides = sides;
 }