コード例 #1
0
 private void NeededAction()
 {
     saveSystem.SetDefaultLevel();
     saveSystem.SaveData();
     SetingsSeter.Set();
     SceneSlider.SwitchToScene(saveSystem.savedData.level);
 }
コード例 #2
0
 public override void Action()
 {
     if (isInteractable)
     {
         SetingsSeter.Set();
         SceneSlider.SwitchToScene(saveSystem.savedData.level);
     }
 }
コード例 #3
0
 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();
         }
     }
 }