private void StartGame(int gameIndex) { if (saveLoadGames && gameIndex >= startSavingFrom) { PlayerPrefs.SetInt(("Checkpoint" + PlayEducaAttributes.GetCurrentActivity() + PlayEducaAttributes.GetchildID()), gameIndex); } games[gameIndex].gameObject.SetActive(true); games[gameIndex].StartGame(); }
private void EndAllGames() { if (activityAnalytics != null) { Debug.Log("FinishActivity"); activityAnalytics.FinishActivity(); } if (saveLoadGames) { currentGame = 0; PlayerPrefs.SetInt(("Checkpoint" + PlayEducaAttributes.GetCurrentActivity() + PlayEducaAttributes.GetchildID()), currentGame); } OnFinishAllGames.Invoke(); }
public void GameStart() { DisabeAllGamesObjects(); if (activityAnalytics != null) { Debug.Log("StartActivity"); activityAnalytics.StartActivity(); } if (saveLoadGames) { currentGame = PlayerPrefs.GetInt("Checkpoint" + PlayEducaAttributes.GetCurrentActivity() + PlayEducaAttributes.GetchildID()); } else { currentGame = 0; } StartGame(currentGame); }