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(); }
public virtual LabyrinthObject CreateNextLabyrinth() { var data = LabyrinthManager.Instance.Labyrinths[LabyrinthIndexWrap]; labyrinthIndex++; 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 * Labyrinths.Utils.SelectionOffset * (labyrinths.Count - 1); return(labyrinth); }