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 } }); }
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 } }); }