Ejemplo n.º 1
0
 public void LoadDataGoldGemFromServer()
 {
     OneHitAPI.GetGoldGemById(DataManager.instance.userData.databaseId, DataManager.instance.userData.userId,
                              (_messageReceiving, _error) => {
         if (_messageReceiving != null)
         {
             DataManager.instance.userData.gold = _messageReceiving.readLong();
             #if TEST
             Debug.Log(">>>Recieving Data GetGoldGemById: Gold: " + DataManager.instance.userData.gold);
             #endif
             if (HomeManager.instance != null)
             {
                 if (HomeManager.instance.myCallbackManager != null &&
                     HomeManager.instance.myCallbackManager.onLoadDataGoldGemFinished != null)
                 {
                     HomeManager.instance.myCallbackManager.onLoadDataGoldGemFinished();
                 }
                 HomeManager.instance.CheckShowRemindRating();
             }
             HomeManager.getGoldAndGemInfoAgain = false;
         }
         else
         {
             #if TEST
             Debug.LogError("Lỗi GetGoldGemById. Error code: " + _error);
             #endif
         }
     });
 }
Ejemplo n.º 2
0
    void LoadGoldFromServer()
    {
        OneHitAPI.GetGoldGemById(DataManager.instance.userData.databaseId, DataManager.instance.userData.userId,
                                 (_messageReceiving, _error) => {
            if (_messageReceiving != null)
            {
                DataManager.instance.userData.gold = _messageReceiving.readLong();
                #if TEST
                Debug.Log(">>>Recieving Data GetGoldGemById: Gold: " + DataManager.instance.userData.gold);
                #endif

                realMyGold = DataManager.instance.userData.gold;
                RefreshMyGoldInfo(true);
            }
            else
            {
                #if TEST
                Debug.LogError("Lỗi GetGoldGemById. Error code: " + _error);
                #endif
            }
        });
    }