コード例 #1
0
ファイル: MainController.cs プロジェクト: Just3F/xCalculator
        public void StartGame()
        {
            if (PlayerPrefs.GetInt("battery", 5) < 0)
            {
                Debug.Log("You need to charge your battery.");
                return;
            }
            UITopBar.SetActive(true);
            UICalculator.SetActive(true);

            ResetValuesToDefault();
            ResetDisplayValues();

            BuildsNormal.ForEach(x => x.SetActive(true));
            BuildsDestroyed.ForEach(x => x.SetActive(false));

            isPlaying = true;
            gameCamera.GetComponent <Animator>().SetTrigger("GoToBuild_01");
        }
コード例 #2
0
ファイル: MainController.cs プロジェクト: Just3F/xCalculator
 public void StopGame()
 {
     UITopBar.SetActive(false);
     UICalculator.SetActive(false);
     isPlaying = false;
 }