private void OnApplicationQuit() { if (MainGameLogic.IsMainGame() || MainGameLogic.IsGameMenu()) { if (manager != null && !manager.IsPerformingAction()) { manager.Save(); } } }
// 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(); } } }