예제 #1
0
    private void Awake()
    {
        btnStart.onClick.AddListener(() => StartCoroutine(OnBtnStart()));
        btnExit.onClick.AddListener(OnBtnExit);

        bool lvl1Done = SaveDataController.IsLevelDone(1);
        bool lvl2Done = SaveDataController.IsLevelDone(2);
        bool lvl3Done = SaveDataController.IsLevelDone(3);

        btnLevel1.SetEnabled(true);
        btnLevel2.SetEnabled(lvl1Done);

        btnLevel1.AddAction(() => SelectLevel(1));
        btnLevel2.AddAction(() => SelectLevel(2));
    }