Esempio n. 1
0
File: Hex.cs Progetto: Syksy/HexEn3D
 // Obtain global coordinates if xglobal & yglobal have been set
 public xyz[] getGlobalVertices()
 {
     xyz[] xyzs = new xyz[7];
     if (xglobal != -1 & yglobal != -1)
     {
         // Global info available, mapping each vertex shifted by corresponding tile origo
         xyzs = HexMapper.createGlobalHexVertexCoord(xglobal, yglobal);
     }
     else
     {
         // No global info provided, using local coordinates instead as if located at {0,0} in tile map
         xyzs = this.getVertices();
     }
     return(xyzs);
 }
Esempio n. 2
0
File: Hex.cs Progetto: Syksy/HexEn3D
 public void setGlobalCoord(int x, int y)
 {
     this.xglobal  = x;
     this.yglobal  = y;
     this.vertices = HexMapper.createGlobalHexVertexCoord(x, y);
 }