예제 #1
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     carouselScreen.SetActive(true);
     failedLoginContent.SetActive(false);
     normalLoginContent.SetActive(true);
     successScreen.SetActive(false);
 }
예제 #2
0
        public void UpdateScreenData(ILootLockerStageData stageData)
        {
            LootLockerSessionResponse sessionResponse = stageData != null ? stageData as LootLockerSessionResponse : this.sessionResponse;

            this.sessionResponse = sessionResponse;
            GetComponentInChildren <PlayerProfile>()?.UpdateScreen(sessionResponse);
            GetComponentInChildren <Progression>()?.UpdateScreen(sessionResponse);
            bottomOpener?.Open();
        }
예제 #3
0
        public void UpdateScreenData(ILootLockerStageData stageData)
        {
            LootLockerGetPersistentStoragResponse response = stageData as LootLockerGetPersistentStoragResponse;

            if (response != null)
            {
                UpdateScreen(response.payload);
                LoadingManager.HideLoadingScreen();
            }
            else
            {
                Refresh();
            }
        }
예제 #4
0
        public void GoToStage(StageID newStageID, ILootLockerStageData stageData)
        {
            Stage stage = stages.Find(s => s.stageID == newStageID);

            activeStage = stage;

            foreach (Stage loopStage in stages)
            {
                loopStage.stageObject?.GetComponent <ScreenCloser>()?.Close();
            }
            //update the screen with data
            stage.stageObject?.GetComponent <ILootLockerStageOwner>()?.UpdateScreenData(stageData);
            stage.stageObject?.GetComponent <ScreenOpener>()?.Open();
        }
예제 #5
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     asset = stageData as InventoryAssetResponse.DemoAppAsset;
     if (asset != null)
     {
         if (asset.files != null && asset.files.Length > 0)
         {
             url = asset.files.Last().url;
             TypeOfFile filetype = GetFileType(url);
             downloadFileBtn.onClick.AddListener(() =>
             {
                 LoadingManager.ShowLoadingScreen();
                 DownloadFile(filetype);
             });
         }
     }
 }
예제 #6
0
        public void UpdateScreenData(ILootLockerStageData stageData)
        {
            LoadingManager.ShowLoadingScreen();
            LootLockerGMMessage selectedMessage = stageData as LootLockerGMMessage;

            if (!string.IsNullOrEmpty(selectedMessage.image))
            {
                messageImage.gameObject.SetActive(true);
                _ = DownloadImage(selectedMessage.image, messageImage);
            }
            else
            {
                messageImage.gameObject.SetActive(false);
                LoadingManager.HideLoadingScreen();
            }
            messageSummary.text = selectedMessage.summary ?? "";
            messageBody.text    = selectedMessage.body ?? "";
            messageTitle.text   = selectedMessage.title ?? "";
        }
예제 #7
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     ViewMessages();
 }
예제 #8
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     ListPlayers();
 }
예제 #9
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     ViewCollectables();
 }
예제 #10
0
 public void StartEasyPrefab(ILootLockerStageData stageData)
 {
     GetComponent <ScreenOpener>()?.Open();
     UpdateScreenData(stageData);
 }
예제 #11
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     ViewStore();
 }
예제 #12
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
     ViewInventory();
 }
예제 #13
0
        public void UpdateScreenData(ILootLockerStageData stageData)
        {
            if (stageData != null)
            {
                createPlayerRequest = stageData as CreatePlayerRequest;
                LootLockerConfig.current.playerName = createPlayerRequest.playerName;
                LoadingManager.ShowLoadingScreen();
                failResponse = () => { StagesManager.instance.GoToStage(StagesManager.StageID.Player, null); };
                //Starting session first before character is chosen
                StartSession(() =>
                {
                    foreach (Transform tr in parent)
                    {
                        Destroy(tr.gameObject);
                    }

                    LootLockerSDKManager.GetCharacterLoadout((response) =>
                    {
                        if (response.success)
                        {
                            foreach (LootLockerLootLockerLoadout loadout in response.loadouts)
                            {
                                GameObject selectionButton = Instantiate(characterClassPrefab, parent);
                                selectionButton.GetComponent <ClassSelectionButton>()?.Init(loadout);
                            }
                        }
                        else
                        {
                            StagesManager.instance.GoToStage(StagesManager.StageID.CreatePlayer, null);
                        }
                        LoadingManager.HideLoadingScreen();
                    });
                });
                //if we are creating a new character then we want to set character details once it is created
                button.onClick.RemoveAllListeners();
                button.onClick.AddListener(() =>
                {
                    UpdateDefaultCharacterClass(() =>
                    {
                        if (!isEasyPrefab)
                        {
                            LocalPlayer localPlayer = new LocalPlayer {
                                playerName = createPlayerRequest.playerName, uniqueID = guid.ToString(), characterClass = loadout?.character
                            };
                            List <LocalPlayer> localPlayers = JsonConvert.DeserializeObject <List <LocalPlayer> >(PlayerPrefs.GetString("localplayers"));
                            localPlayers.Add(localPlayer);
                            PlayerPrefs.SetString("localplayers", JsonConvert.SerializeObject(localPlayers));
                            LootLockerConfig.current.deviceID    = localPlayer.uniqueID;
                            LootLockerConfig.current.playerClass = loadout.character.type.ToString();
                            //Character has been set, we can now load the home page
                            StagesManager.instance.GoToStage(StagesManager.StageID.Home, sessionResponse);
                        }
                        else
                        {
                            Debug.Log("Updated the default class for the current player");
                        }
                    });
                });
            }
            else
            {
                failResponse = () => { StagesManager.instance.GoToStage(StagesManager.StageID.Settings, null); };

                foreach (Transform tr in parent)
                {
                    Destroy(tr.gameObject);
                }

                LootLockerSDKManager.GetCharacterLoadout((response) =>
                {
                    if (response.success)
                    {
                        foreach (LootLockerLootLockerLoadout loadout in response.loadouts)
                        {
                            GameObject selectionButton = Instantiate(characterClassPrefab, parent);
                            selectionButton.GetComponent <ClassSelectionButton>()?.Init(loadout);
                        }
                    }
                    else
                    {
                        StagesManager.instance.GoToStage(StagesManager.StageID.Settings, null);
                    }
                    LoadingManager.HideLoadingScreen();
                });
                //if we are just updating the character class for player, then after it is completed. We want to return to the inventory screen
                button.onClick.RemoveAllListeners();
                button.onClick.AddListener(() =>
                {
                    UpdateDefaultCharacterClass(() =>
                    {
                        //Character has been set, we can now load inventory
                        StagesManager.instance.GoToStage(StagesManager.StageID.Settings, null);
                    });
                });
            }
        }
예제 #14
0
 public void UpdateScreenData(ILootLockerStageData stageData)
 {
 }