//public void Init(MenuMode mode, GameObject ContainerForSpawnedItems, string InstructionName = null) //{ // _mode = mode; // _instructionManager = InstructionManager.Instance; // this.ContainerForSpawnedItems = ContainerForSpawnedItems; // if (_mode == MenuMode.Record || _mode == MenuMode.Edit) // { // if(_mode == MenuMode.Edit) // { // _instructionManager.LoadInstruction(InstructionName); // LoadStep(_instructionManager.GetCurrentStep()); // } // else // { // _instructionManager.CreateNewInstruction(InstructionName, DateTime.Now); // } // NextStepButton.SetActive(true); // Keyboard.TextTyped.AddListener(NewText); // } // else // { // _instructionManager.LoadInstruction(InstructionName); // InsertTextButton.SetActive(false); // FinishButton.SetActive(false); // LoadStep(_instructionManager.GetCurrentStep()); // if (!_instructionManager.NextStepAvailabe()) // { // NextStepButton.SetActive(false); // } // } // PreviousStepButton.SetActive(false); //} /// <summary> /// goes into the next step of the instruction or adds a new steps if current steps is the last one /// </summary> public void NextStep() { // is this alway necessary? _instructionManager.Save(); ClearItems(); if (!_instructionManager.NextStepAvailabe() && (_mode == MenuMode.Record /*||_mode == MenuMode.Edit*/)) { _instructionManager.AddStep(); PhotoVideoPanelController.Reset(_instructionManager.GetCurrentMediaFiles()); InstructionText.text = "Description:"; } else { _instructionManager.StepForward(); LoadStep(_instructionManager.GetCurrentStep()); if (!_instructionManager.NextStepAvailabe() && _mode == MenuMode.Replay) { NextStepButton.SetActive(false); } } // this should be alway true if (_instructionManager.PreviousStepAvailabe()) { PreviousStepButton.SetActive(true); } SetStepCounterText(); }