void Start() { _matrix = GetComponent<CubeMatrix>(); for (var y = 0; y < height; y++) { for (var x = 0; x < loop; x++) { var cube = _matrix[x, y]; var cubeInfo = new CubeInfo(){ state = State.Off, materials = stateMaterials[0], renderer = cube.GetComponent<Renderer>() }; _cubeInfos[x, y] = cubeInfo; } } }
private void CreateCubes() { cubeMatrix = new CubeMatrix(); gameplayLayer.AddChild(cubeMatrix); }