Exemple #1
0
        private void OnUserDataUpdated(string request_id)
        {
            if (OnDataUpdated != null)
            {
                SPConsumeGemsRequest request = (SPConsumeGemsRequest)getRequestById(request_id);


                //Hacemos un usuario para el diff
                UserGem remoteUser = new UserGem(userId);
                remoteUser.gems = request.data.gemBalance;

                OnDataUpdated(JsonUtility.ToJson(remoteUser));
            }
        }
Exemple #2
0
        private void OnUserDataObtained(string request_id)
        {
            if (mainUpdateRequest != null && mainUpdateRequest.id == request_id)
            {
                mainUpdateRequest = null;
            }

            if (OnDataReceived != null)
            {
                SPGetGemsRequest request = (SPGetGemsRequest)getRequestById(request_id);

                //Hacemos un usuario para el diff
                UserGem remoteUser = new UserGem(userId);
                remoteUser.gems = request.data.gemBalance;

                OnDataReceived(JsonUtility.ToJson(remoteUser));
            }
        }