Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ShutovKS committed Feb 29, 2024
2 parents c5666d1 + 7b61ce5 commit 58f2af9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ private void Start()
_uiFactoryInfo.MainMenuUI.Buttons.OnStartNewGameButtonClicked = StartNewGame;
_uiFactoryInfo.MainMenuUI.Buttons.OnContinueGameButtonClicked = ContinueGame;

var gameData = _saveLoadData.GetData();
_uiFactoryInfo.MainMenuUI.Buttons.SetContinueGameButtonInteractable(
!string.IsNullOrEmpty(gameData.currentDialogue));

_sounds.SetClip(ResourcesPath.SOUND_MAIN_MENU, true);

_loadSceneAsync = SceneManager.LoadSceneAsync("3.Core");
Expand Down Expand Up @@ -85,11 +89,11 @@ private void LoadDataGame()
ui.OnButtonClicked = () =>
{
gameData.currentDialogue = data.idLastDialogue;

_uiFactoryInfo.SaveLoadUI.SetActivePanel(false);

_menu.ClosedMenu();

_loadSceneAsync.allowSceneActivation = true;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ private void Awake()
#endif
}

public void SetContinueGameButtonInteractable(bool value)
{
_continueGameButton.interactable = value;
}

public void SetLoadGameButton(string text)
{
_loadGameButtonText.text = text;
Expand Down

0 comments on commit 58f2af9

Please sign in to comment.