Пример #1
0
 private void OnApplicationQuit()
 {
     if (MainGameLogic.IsMainGame() || MainGameLogic.IsGameMenu())
     {
         if (manager != null && !manager.IsPerformingAction())
         {
             manager.Save();
         }
     }
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (!MainGameLogic.IsMainGame())
        {
            return;
        }

        if (manager != null)
        {
            manager.Update();
        }

        if (Input.GetKeyDown(KeyCode.Home))
        {
            if (MainGameLogic.IsMainGame() || MainGameLogic.IsGameMenu())
            {
                manager.Save();
            }
        }
    }