Exemple #1
0
    private void OnUserStatsStored(UserStatsStored_t pCallback)
    {
        if (!((ulong)gameID == pCallback.m_nGameID))
        {
            return;
        }

        if (EResult.k_EResultOK == pCallback.m_eResult)
        {
            Debug.Log("StoreStats - success");
        }
        else if (EResult.k_EResultInvalidParam == pCallback.m_eResult)
        {
            // One or more stats we set broke a constraint. They've been reverted,
            // and we should re-iterate the values now to keep in sync.
            Debug.Log("StoreStats - some failed to validate");
            // fake up a callback so that we re-load the values
            UserStatsReceived_t callback = new UserStatsReceived_t();
            callback.m_eResult = EResult.k_EResultOK;
            callback.m_nGameID = (ulong)gameID;
            OnUserStatsReceived(callback);
        }
        else
        {
            Debug.Log("StoreStats - failed, " + pCallback.m_eResult);
        }
    }
 /// <summary>
 /// Our stats data was stored!
 /// </summary>
 /// <param name="pCallback">Our callback.</param>
 private void OnUserStatsStored(UserStatsStored_t pCallback)
 {
     // we may get callbacks for other games' stats arriving, ignore them
     if ((ulong)m_GameID == pCallback.m_nGameID)
     {
         if (EResult.k_EResultOK == pCallback.m_eResult)
         {
             Console.WriteLine("StoreStats - success");
         }
         else if (EResult.k_EResultInvalidParam == pCallback.m_eResult)
         {
             // One or more stats we set broke a constraint. They've been reverted,
             // and we should re-iterate the values now to keep in sync.
             Console.WriteLine("StoreStats - some failed to validate");
             // Fake up a callback here so that we re-load the values.
             UserStatsReceived_t callback = new UserStatsReceived_t();
             callback.m_eResult = EResult.k_EResultOK;
             callback.m_nGameID = (ulong)m_GameID;
             OnUserStatsReceived(callback);
         }
         else
         {
             Console.WriteLine("StoreStats - failed, " + pCallback.m_eResult);
         }
     }
 }
    private void OnStatsStored(UserStatsStored_t data)
    {
        if (data.m_nGameID == (ulong)gameID)
        {
            switch (data.m_eResult)
            {
            case EResult.k_EResultOK:
            {
                Debug.Log("StoreStats - success");
                break;
            }

            case EResult.k_EResultInvalidParam:
            {
                Debug.Assert(false, "StoreStats - some failed to validate");
                // We done messed up. Reset stats to some earlier point
                LoadStatsFromSteam();
                break;
            }

            default:
            {
                Debug.Log("StoreStats - failed, " + data.m_eResult);
                break;
            }
            }
        }
    }
Exemple #4
0
    private void OnUserStatsStored(UserStatsStored_t pCallback)
    {
        // we may get callbacks for other games' stats arriving, ignore them

        /*
         * if ((ulong)m_GameID == pCallback.m_nGameID)
         * {
         *  if (EResult.k_EResultOK == pCallback.m_eResult)
         *  {
         *      Debug.Log("StoreStats - success");
         *  }
         *  else if (EResult.k_EResultInvalidParam == pCallback.m_eResult)
         *  {
         *      // One or more stats we set broke a constraint. They've been reverted,
         *      // and we should re-iterate the values now to keep in sync.
         *      Debug.Log("StoreStats - some failed to validate");
         *      // Fake up a callback here so that we re-load the values.
         *      UserStatsReceived_t callback = new UserStatsReceived_t();
         *      callback.m_eResult = EResult.k_EResultOK;
         *      callback.m_nGameID = (ulong)m_GameID;
         *      OnUserStatsReceived(callback);
         *  }
         *  else
         *  {
         *      Debug.Log("StoreStats - failed, " + pCallback.m_eResult);
         *  }
         * }
         */
    }
Exemple #5
0
 private void OnStatsStored(UserStatsStored_t stats)
 {
     // FIXME: Pray that we don't get overlap -flibit
     if (statStoreAction != null)
     {
         statStoreAction.IsCompleted = true;
     }
 }
 private void OnUserStatsStored(UserStatsStored_t args)
 {
     if (args.m_nGameID == SteamUtils.GetAppID().m_AppId)
     {
         if (args.m_eResult == EResult.k_EResultOK)
         {
             // Steamworks stats and achievements stored
             //App.LogDebug( "Steamworks user stats stored." );
         }
     }
 }
        private void UserStatsStored(UserStatsStored_t stats)
        {
            if (stats.GameID != client.AppId)
            {
                return;
            }

            Refresh();

            OnUpdated?.Invoke();
        }
 //CallRedult method to check if the StoreStats was successfull or not
 private static void OnUserStatsStored(UserStatsStored_t _callback, bool IOFailure)
 {
     if (EResult.k_EResultOK == _callback.m_eResult)
     {
         Debug.Log("StoreStats was successful");
     }
     else
     {
         Debug.Log("StoreStats failed");
     }
 }
 private void OnUserStatsStored(UserStatsStored_t pCallback)
 {
     if ((ulong)m_GameID == pCallback.m_nGameID && pCallback.m_eResult != EResult.k_EResultOK)
     {
         if (pCallback.m_eResult == EResult.k_EResultInvalidParam)
         {
             Debug.Log("StoreStats - some failed to validate");
             UserStatsReceived_t pCallback2 = default(UserStatsReceived_t);
             pCallback2.m_eResult = EResult.k_EResultOK;
             pCallback2.m_nGameID = (ulong)m_GameID;
             OnUserStatsReceived(pCallback2);
         }
         else
         {
             Debug.Log("StoreStats - failed, " + pCallback.m_eResult);
         }
     }
 }
 private void OnUserStatsStored(UserStatsStored_t pCallback)
 {
 }
 private void OnUserStatsStored(UserStatsStored_t pCallback)
 {
     Debug.Log("[" + UserStatsStored_t.k_iCallback + " - UserStatsStored] - " + pCallback.m_nGameID + " -- " + pCallback.m_eResult);
 }