void InstantiateBricks(BrickArrangement inputBrickArrangement) { foreach (Brick brick in inputBrickArrangement.allBricks) { bricksInScene.Add(Instantiate(brickMesh, inputBrickArrangement.GetRealBrickPosition(brick), brick.rotation, brickMesh.transform.parent)); } brickArrangement.GenerateGraph(); InstantiateCellDisplay(inputBrickArrangement); }
// Update is called once per frame void Update() { for (int i = 0; i < brickArrangement.allBricks.Count; i++) { bricksInScene[i].transform.position = brickArrangement.GetRealBrickPosition(brickArrangement.allBricks[i]); bricksInScene[i].transform.rotation = brickArrangement.allBricks[i].rotation; } UpdateCellDisplay(brickArrangement); UpdateToggle(); UpdateJourneyTimeText(); UpdateRobot(); }