コード例 #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.C) && !cheats.isActiveAndEnabled)
     {
         cheats.Show();
         return;
     }
     if (Input.GetKeyDown(KeyCode.C) && cheats.isActiveAndEnabled)
     {
         cheats.Hide();
     }
     if (!isStarted || BuildingPrefabOnMouse != null)
     {
         return;
     }
     if (Input.GetKeyDown(KeyCode.Escape) && !ingameMenu.isActiveAndEnabled)
     {
         ingameMenu.Show();
         EventManager.Instance.StartPause();
         return;
     }
     if (Input.GetKeyDown(KeyCode.Escape) && ingameMenu.isActiveAndEnabled)
     {
         ingameMenu.Resume();
         EventManager.Instance.EndPause();
     }
 }