public void AddInitialLabyrinths() { for (int i = 0; i < ReplayManager.Instance.GameReplay.Value.Levels.Count; i++) { if (i % Labyrinths.Utils.SelectMaxHorizontal == 0) { AddInitialBottomLabyrinth(i); } else { sections[sections.Count - 1].AddButton(ReplayManager.Instance.GameReplay.Value.Previews[i]); } } OnContentChangedHandler?.Invoke(); }
public override void AddLabyrinth(int i) { var data = LabyrinthManager.Instance.Labyrinths[i]; LabyrinthObject labyrinth = Resources.Instance .GetLabyrinthObject(data) .Create(data); labyrinths.Add(labyrinth); labyrinth.GenerateLabyrinthVisual(); labyrinth.Init(enableCamera: true); labyrinth.Camera.OutputToTexture = true; labyrinth.transform.position = Vector3.right * Utils.SelectionOffset * (labyrinths.Count - 1); AddSection().AddButton(labyrinth); OnContentChangedHandler?.Invoke(); }