예제 #1
0
 public void Awake()
 {
     AdsManager.CreateInstance();
     NewGameButton.onClick.AddListener(() => StartPage.gameObject.SetActive(true));
     if (!SaveManager.Instance.HasSave())
     {
         ContinueButton.interactable = false;
         ContinueButton.GetComponentInChildren <Text>().color = Color.gray;
     }
     ContinueButton.onClick.AddListener(ContinueGame);
     AboutGameButton.onClick.AddListener(() => AboutPage.gameObject.SetActive(true));
     ExitButton.onClick.AddListener(Application.Quit);
     StartPage.gameObject.SetActive(false);
     AboutPage.gameObject.SetActive(false);
     StartPageBackButton.onClick.AddListener(() => StartPage.gameObject.SetActive(false));
     AboutPageBackButton.onClick.AddListener(() => AboutPage.gameObject.SetActive(false));
     NameField.onValueChanged.AddListener(SetName);
     StartNewGameButton.gameObject.SetActive(false);
     StartNewGameButton.onClick.AddListener(StartNewGame);
 }