コード例 #1
0
        public static void UpdatingAnAssetCandidate(int assetId, bool isCompleted, Action <LootLockerUserGenerateContentResponse> onComplete,
                                                    string name = null, Dictionary <string, string> kv_storage       = null, Dictionary <string, string> filters = null,
                                                    Dictionary <string, string> data_entities = null, int context_id = -1)
        {
            if (!CheckInitialized())
            {
                return;
            }

            ConvertAssetDictionaries(kv_storage, filters, data_entities,
                                     out List <LootLockerAssetKVPair> temp_kv, out List <LootLockerAssetKVPair> temp_filters, out List <LootLockerDataEntity> temp_data);

            LootLockerAssetData assetData = new LootLockerAssetData
            {
                name          = name,
                kv_storage    = temp_kv.ToArray(),
                filters       = temp_filters.ToArray(),
                data_entities = temp_data.ToArray(),
                context_id    = context_id,
            };

            LootLockerCreatingOrUpdatingAnAssetCandidateRequest data = new LootLockerCreatingOrUpdatingAnAssetCandidateRequest
            {
                data      = assetData,
                completed = isCompleted,
            };

            LootLockerGetRequest getRequest = new LootLockerGetRequest();

            getRequest.getRequests.Add(assetId.ToString());

            LootLockerAPIManager.UpdatingAnAssetCandidate(data, getRequest, onComplete);
        }
コード例 #2
0
        public static void GetDetailedInformationAboutAGame(string id, Action <LootLockerCreatingAGameResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(id.ToString());
            DemoAppAdminRequests.GetDetailedInformationAboutAGame(lootLockerGetRequest, onComplete);
        }
コード例 #3
0
        public static void ActivatingARentalAsset(int assetId, Action <LootLockerCharacterLoadoutResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId.ToString());
            LootLockerAPIManager.ActivatingARentalAsset(data, onComplete);
        }
コード例 #4
0
        public static void RemoveFavouriteAsset(string assetId, Action <LootLockerAssetResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId);
            LootLockerAPIManager.RemoveFavouriteAsset(data, onComplete);
        }
コード例 #5
0
        public static void StartingAMission(int missionId, Action <LootLockerStartingAMissionResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(missionId.ToString());
            LootLockerAPIManager.StartingAMission(data, onComplete);
        }
コード例 #6
0
        public static void GettingASingleAssetCandidate(int assetId, Action <LootLockerUserGenerateContentResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId.ToString());
            LootLockerAPIManager.GettingASingleAssetCandidate(data, onComplete);
        }
コード例 #7
0
        public static void OpenALootBoxForAssetInstances(int assetId, Action <LootLockerOpenLootBoxResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId.ToString());
            LootLockerAPIManager.OpenALootBox(data, onComplete);
        }
コード例 #8
0
        public static void CreateTriggers(LootLockerCreateTriggersRequest requestData, int game_id, Action <LootLockerListTriggersResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(game_id.ToString());
            DemoAppAdminRequests.CreateTriggers(requestData, data, onComplete);
        }
コード例 #9
0
        public static void UnEquipIdAssetToCharacter(string assetId, Action <LootLockerCharacterLoadoutResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(assetId);
            LootLockerAPIManager.UnEquipIdAssetToCharacter(lootLockerGetRequest, onComplete);
        }
コード例 #10
0
        public static void GetAssetInformation(string assetId, Action <LootLockerCommonAsset> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId);
            LootLockerAPIManager.GetAssetInformation(data, onComplete);
        }
コード例 #11
0
        public static void GetAllKeyValuePairsToAnInstance(int instanceId, Action <LootLockerAssetDefaultResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(instanceId.ToString());
            LootLockerAPIManager.GetAllKeyValuePairsToAnInstance(data, onComplete);
        }
コード例 #12
0
        public static void GetAssetListWithCount(int assetCount, Action <LootLockerAssetResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetCount.ToString());
            LootLockerAPIManager.GetAssetListWithCount(data, onComplete);
        }
コード例 #13
0
        public static void GetOtherPlayersPublicKeyValuePairs(string otherPlayerId, Action <LootLockerGetPersistentStoragResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(otherPlayerId);
            LootLockerAPIManager.GetOtherPlayersPublicKeyValuePairs(data, onComplete);
        }
コード例 #14
0
        public static void DeleteKeyValue(string keyToDelete, Action <LootLockerGetPersistentStoragResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(keyToDelete);
            LootLockerAPIManager.DeleteKeyValue(data, onComplete);
        }
コード例 #15
0
        public static void GetSingleKeyPersistentStorage(string key, Action <LootLockerGetPersistentSingle> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(key);
            LootLockerAPIManager.GetSingleKeyPersistentStorage(data, onComplete);
        }
コード例 #16
0
        public static void GetOtherPlayersCharacterLoadout(string characterID, Action <LootLockerCharacterLoadoutResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(characterID);
            data.getRequests.Add(LootLockerConfig.current.platform.ToString());
            LootLockerAPIManager.GetOtherPlayersCharacterLoadout(data, onComplete);
        }
コード例 #17
0
        public static void GetCurrentLoadOutToOtherCharacter(string characterID, Action <LootLockerGetCurrentLoadouttoDefaultCharacterResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(characterID);
            lootLockerGetRequest.getRequests.Add(LootLockerConfig.current.platform.ToString());
            LootLockerAPIManager.GetCurrentLoadOutToOtherCharacter(lootLockerGetRequest, onComplete);
        }
コード例 #18
0
        public static void RemovingFilesFromAssetCandidates(int assetId, int fileId, Action <LootLockerUserGenerateContentResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }

            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId.ToString());
            data.getRequests.Add(fileId.ToString());

            LootLockerAPIManager.RemovingFilesFromAssetCandidates(data, onComplete);
        }
コード例 #19
0
        public static void GetAssetsById(string[] assetIdsToRetrieve, Action <LootLockerAssetResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            for (int i = 0; i < assetIdsToRetrieve.Length; i++)
            {
                data.getRequests.Add(assetIdsToRetrieve[i]);
            }

            LootLockerAPIManager.GetAssetsById(data, onComplete);
        }
コード例 #20
0
        public static void UpdateKeyValuePairByIdForAssetInstances(int assetId, string key, string value, Action <LootLockerAssetDefaultResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest data = new LootLockerGetRequest();

            data.getRequests.Add(assetId.ToString());
            LootLockerCreateKeyValuePairRequest createKeyValuePairRequest = new LootLockerCreateKeyValuePairRequest();

            createKeyValuePairRequest.key   = key;
            createKeyValuePairRequest.value = value;
            LootLockerAPIManager.UpdateKeyValuePairById(data, createKeyValuePairRequest, onComplete);
        }
コード例 #21
0
        public static void EquipGlobalAssetToCharacter(string assetId, string assetVariationId, string characterID, Action <LootLockerCharacterLoadoutResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerEquipByAssetRequest data = new LootLockerEquipByAssetRequest();

            data.asset_id           = int.Parse(assetId);
            data.asset_variation_id = int.Parse(assetVariationId);
            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(characterID);
            LootLockerAPIManager.EquipGlobalAssetToCharacter(lootLockerGetRequest, data, onComplete);
        }
コード例 #22
0
        public static void UpdateCharacter(string characterID, string newCharacterName, bool isDefault, Action <LootLockerCharacterLoadoutResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }

            LootLockerUpdateCharacterRequest data = new LootLockerUpdateCharacterRequest();

            data.name       = newCharacterName;
            data.is_default = isDefault;

            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(characterID);

            LootLockerAPIManager.UpdateCharacter(lootLockerGetRequest, data, onComplete);
        }
コード例 #23
0
        public static void FinishingEvent(int missionId, string signature, string finishTime, string finishScore, LootLockerCheckpointTimes[] checkpointsScores, Action <LootLockerFinishEventResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerEventPayload payload = new LootLockerEventPayload {
                finish_score = finishScore, finish_time = finishTime
            };

            payload.checkpoint_times = checkpointsScores;
            FinishEventRequest data = new FinishEventRequest {
                signature = signature, payload = payload
            };
            LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            lootLockerGetRequest.getRequests.Add(missionId.ToString());
            LootLockerAPIManager.FinishingEvent(lootLockerGetRequest, data, onComplete);
        }
コード例 #24
0
        public static void UpdateOneOrMoreKeyValuePairForAssetInstances(int assetId, Dictionary <string, string> data, Action <LootLockerAssetDefaultResponse> onComplete)
        {
            if (!CheckInitialized())
            {
                return;
            }
            LootLockerGetRequest request = new LootLockerGetRequest();

            request.getRequests.Add(assetId.ToString());
            LootLockerUpdateOneOrMoreKeyValuePairRequest createKeyValuePairRequest = new LootLockerUpdateOneOrMoreKeyValuePairRequest();
            List <LootLockerCreateKeyValuePairRequest>   temp = new List <LootLockerCreateKeyValuePairRequest>();

            foreach (var d in data)
            {
                temp.Add(new LootLockerCreateKeyValuePairRequest {
                    key = d.Key, value = d.Value
                });
            }
            createKeyValuePairRequest.storage = temp.ToArray();
            LootLockerAPIManager.UpdateOneOrMoreKeyValuePair(request, createKeyValuePairRequest, onComplete);
        }
コード例 #25
0
        public static void AddingFilesToAssetCandidates(int assetId, string filePath, string fileName,
                                                        FilePurpose filePurpose, Action <LootLockerUserGenerateContentResponse> onComplete, string fileContentType = null)
        {
            if (!CheckInitialized())
            {
                return;
            }

            LootLockerAddingFilesToAssetCandidatesRequest data = new LootLockerAddingFilesToAssetCandidatesRequest()
            {
                filePath        = filePath,
                fileName        = fileName,
                fileContentType = fileContentType,
                filePurpose     = filePurpose.ToString()
            };

            LootLockerGetRequest getRequest = new LootLockerGetRequest();

            getRequest.getRequests.Add(assetId.ToString());

            LootLockerAPIManager.AddingFilesToAssetCandidates(data, getRequest, onComplete);
        }