2,535
社区成员
发帖
与我相关
我的任务
分享
public int width = 6;
public int height = 4;
public int zPos = 3;
private void CreateWall()
{
for (int x = -width / 2; x < width / 2; ++x)
{
for (int y = 0; y < height; ++y)
{
GameObject go = Instantiate(block, new Vector3(x, y, zPos), Quaternion.identity);
go.transform.SetParent(Wall);
}
}
}