Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        xpBeforeGame = XPManager.GetStoredXP();
        xpAfterGame  = xpBeforeGame + XPManager.GetEarnedXP();
        XPManager.StoreEarnedXP();

        round = SessionManager.currentRound;
        SceneManager.sceneLoaded += OnLevelLoad;
        DontDestroyOnLoad(gameObject);
    }
    public static int StoreEarnedXP()
    {
        int x = GetStoredXP();

        x += XPManager.GetEarnedXP();

        PlayerPrefs.SetInt("XP", x);
        PlayerPrefs.Save();

        return(x);
    }