Esempio n. 1
0
        public void UpdatingInformationAboutAGame()
        {
            Dictionary <string, object> keyValuePairs = new Dictionary <string, object>();

            List <bool> sendBools = new List <bool> {
                sendNewName, sendNewGameKey, sendNewSteamAppID, sendNewSteamAPIKey, sendNewSandboxMode
            };
            List <string> itemNames = new List <string> {
                "name", "game_key", "steam_app_id", "steam_api_key", "sandbox_mode"
            };
            List <object> objectsToAdd = new List <object> {
                newName, newGameKey, newSteamAppID, newSteamAPIKey, newSandboxMode
            };

            for (int i = 0; i < sendBools.Count; i++)
            {
                if (sendBools[i])
                {
                    keyValuePairs.Add(itemNames[i], objectsToAdd[i]);
                }
            }

            LootLockerSDKAdminManager.UpdatingInformationAboutAGame(gameIDToUpdateInfo, keyValuePairs, (response) =>
            {
                if (response.success)
                {
                    Debug.LogError("Successful updated info about game " + gameIDToUpdateInfo.ToString() + ": " + response.text);
                }
                else
                {
                    Debug.LogError("failed to update info about game " + gameIDToUpdateInfo.ToString() + ": " + response.Error);
                }
            });
        }