Esempio n. 1
0
    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();
    }
Esempio n. 2
0
    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();
    }
Esempio n. 3
0
    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);
    }
Esempio n. 4
0
 // Start is called before the first frame update
 void Awake()
 {
     PlayEducaAttributes.SetCurrentActivity(currentGame);
     PlayEducaAttributes.SetChildID(childID);
 }