private void GenerateBgTile(int mapValue, int gridX, int gridY) { //NTODO bgTile外显的计算 //形容下bgTile的特殊处 //left,down,right都有方块时,具体的ui取决与bgTile是否在边缘, var go = TileFactory.CreateBGTile(1); var trm = go.transform; go.transform.SetParent(bgTileRoot, false); Vector3 pos = layout.TileStartPos; float offx = gridX * layout.TileW; float offy = gridY * layout.TileH; pos.x = pos.x + offx; pos.y = pos.y - offy; pos.z = 0; trm.position = pos; trm.localScale = Vector3.one * layout.Scale; }