Пример #1
0
 private void OnEnable()
 {
     try
     {
         if (GC.Data.InGame)
         {
             PlayButtonText.text = "Продолжить";
             PlayButton.onClick.RemoveAllListeners();
             PlayButton.onClick.AddListener(() => GC.ContinueGame());
         }
         else
         {
             PlayButtonText.text = "Новая игра";
             PlayButton.onClick.RemoveAllListeners();
             PlayButton.onClick.AddListener(() => GC.StartGame());
         }
     }
     catch (Exception e)
     {
         PlayButtonText.text = "Новая игра";
         PlayButton.onClick.RemoveAllListeners();
         PlayButton.onClick.AddListener(() => GC.StartGame());
     }
 }