예제 #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();
    }
예제 #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();
    }
예제 #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);
    }