Beispiel #1
0
 public void Load(TriangleBlockData data, Material material)
 {
     for (var i = 0; i < 4; i++)
     {
         if (data.triangles[i])
         {
             CreateTriangle(i, material);
         }
     }
 }
Beispiel #2
0
        public TriangleBlockData ToData()
        {
            var data = new TriangleBlockData();

            data.triangles    = new bool[4];
            data.position     = this.transform.position;
            data.triangles[0] = !!triangles[0];
            data.triangles[1] = !!triangles[1];
            data.triangles[2] = !!triangles[2];
            data.triangles[3] = !!triangles[3];
            return(data);
        }