예제 #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);
    }
예제 #2
0
    public static int StoreEarnedXP()
    {
        int x = GetStoredXP();

        x += XPManager.GetEarnedXP();

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

        return(x);
    }