示例#1
0
    private void Awake()
    {
        gridCanvas = GetComponentInChildren <Canvas>();
        hexMesh    = GetComponentInChildren <HexMesh>();
        cells      = new HexCell[height * width];

        //方政言加,为现实格子内容
        texts       = new Text[height * width];
        gridcontent = GetComponent <GridContent>();
        gridcontent.BuildContent(height * width);
        images = new Image[height * width];
        //方政言加end,为现实格子内容

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