private void NeededAction() { saveSystem.SetDefaultLevel(); saveSystem.SaveData(); SetingsSeter.Set(); SceneSlider.SwitchToScene(saveSystem.savedData.level); }
public override void Action() { if (isInteractable) { SetingsSeter.Set(); SceneSlider.SwitchToScene(saveSystem.savedData.level); } }
private void Update() { if (answerYesButton.isAnswered) { if (playerChoosedYes && !isSecondActionDone) { saveSystem.SetDefaultLevel(); saveSystem.SaveData(); SetingsSeter.Set(); SceneSlider.SwitchToScene(InstructionController.sceneIndex); isSecondActionDone = true; Close(); return; } if (!isActionDone) { playerChoosedYes = true; answerYesButton.isAnswered = false; isActionDone = true; answerYesButton.isActivated = true; if (!saveSystem.savedData.enOrRuLanguage) //Ставим язык в зависимости от настроек { questionText.text = secondQuestionText; answerNoButtonText.text = secondAnswerNoText; return; } questionText.text = secondQuestionTextEN; answerNoButtonText.text = secondAnswerNoTextEN; } } if (answerNoButton.isAnswered) { if (playerChoosedYes && !isSecondActionDone) { isSecondActionDone = true; neededFunction.Invoke(); Close(); return; } if (!isActionDone) { requestedObject.isActivated = true; isActionDone = true; PageInfo.canUseBook = true; Close(); } } }