public void UpdateScreenData(ILootLockerStageData stageData) { carouselScreen.SetActive(true); failedLoginContent.SetActive(false); normalLoginContent.SetActive(true); successScreen.SetActive(false); }
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(); }
public void UpdateScreenData(ILootLockerStageData stageData) { LootLockerGetPersistentStoragResponse response = stageData as LootLockerGetPersistentStoragResponse; if (response != null) { UpdateScreen(response.payload); LoadingManager.HideLoadingScreen(); } else { Refresh(); } }
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(); }
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); }); } } }
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 ?? ""; }
public void UpdateScreenData(ILootLockerStageData stageData) { ViewMessages(); }
public void UpdateScreenData(ILootLockerStageData stageData) { ListPlayers(); }
public void UpdateScreenData(ILootLockerStageData stageData) { ViewCollectables(); }
public void StartEasyPrefab(ILootLockerStageData stageData) { GetComponent <ScreenOpener>()?.Open(); UpdateScreenData(stageData); }
public void UpdateScreenData(ILootLockerStageData stageData) { ViewStore(); }
public void UpdateScreenData(ILootLockerStageData stageData) { ViewInventory(); }
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); }); }); } }
public void UpdateScreenData(ILootLockerStageData stageData) { }