public void LoadGame() { dataOfScene = SaveAndLoad.LoadGame(); DataHandler.data = dataOfScene; sceneLoader.ChangeScene(dataOfScene); }
void Start() { percentDifficultyIncrease = Mathf.Lerp(1, 2, GameManager.gameManager.difficultyDiplo); if (GameManager.gameManager.comingFromDiploWar == true) { saveAndLoad.LoadGame(); faction.GoldScorpions = (int)(GameManager.gameManager.enemiesDestroyed * goldScorpionsPerAgentKilled * percentDifficultyIncrease); faction.Population = (int)(GameManager.gameManager.enemiesDestroyed * populationPerAgentKilled * percentDifficultyIncrease); faction.Food = (int)(GameManager.gameManager.enemiesDestroyed * foodPerAgentKilled * percentDifficultyIncrease); } GameManager.gameManager.comingFromDiploWar = false; GameManager.gameManager.agentsToCombat.Clear(); }