예제 #1
0
        private void SetCurrentGame(int id, bool setToDelete = false)
        {
            Debug.Log("Current Game set to: " + id);
            activeGameID = id;
            if (!setToDelete)
            {
                currentView = LootLockerView.Loading;
                LootLockerSDKAdminManager.GetDetailedInformationAboutAGame(id.ToString(), (response) =>
                {
                    if (response.success)
                    {
                        LootLockerAdminConfig.current.gameName = response.game.development.name;
                        LootLockerAdminConfig.current.apiKey   = response.game.development.game_key;
                        LootLockerAdminConfig.current.gameID   = response.game.development.id;

                        //normal setup
                        if (LootLockerConfig.current != null)
                        {
                            LootLockerConfig.current.apiKey = response.game.game_key;
                            LootLockerConfig.current.gameID = response.game.id;
                        }
                        currentView = LootLockerView.Menu;
                    }
                    else
                    {
                        Debug.LogError("Could not get game details");
                    }
                });
            }
            else
            {
                currentView = LootLockerView.DeleteGameConfirmation;
            }
        }
예제 #2
0
        public void GetDetailedInformationAboutAGame()
        {
            //LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest();

            //lootLockerGetRequest.getRequests.Add(gameIDToGetInfo.ToString());

            LootLockerSDKAdminManager.GetDetailedInformationAboutAGame(gameIDToGetInfo.ToString(), (response) =>
            {
                if (response.success)
                {
                    Debug.LogError("Successful got info about game " + gameIDToGetInfo.ToString() + ": " + response.text);
                }
                else
                {
                    Debug.LogError("failed to get info about game " + gameIDToGetInfo.ToString() + ": " + response.Error);
                }
            });
        }