Ejemplo n.º 1
0
        void Awake()
        {
            gridCanvas = GetComponentInChildren <Canvas>();
            hexMesh    = GetComponentInChildren <HexMesh>();

            cells = new HexCell[height * width];

            for (int z = 0, i = 0; z < height; z++)
            {
                for (int x = 0; x < width; x++)
                {
                    CreateCell(x, z, i++);
                }
            }
        }