public ReaderSceneInfo(LoadingReaderSceneInfo loadingEncounterSceneInfo) { User = loadingEncounterSceneInfo.User; LoadingScreen = loadingEncounterSceneInfo.LoadingScreen; Encounter = loadingEncounterSceneInfo.Encounter.Result.Value; SuggestedEncounters = loadingEncounterSceneInfo.SuggestedEncounters; }
public virtual void StartScene(LoadingReaderSceneInfo encounterSceneInfo) { LoadingReaderSceneInfoSelector.Select(this, new LoadingReaderSceneInfoSelectedEventArgs(encounterSceneInfo)); if (!opened) { OnButtonClicked(); } }
public virtual void StartScene(LoadingReaderSceneInfo data) { data.LoadingScreen?.Show(); SignalBus.Fire <SceneChangedSignal>(); var loading = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(ScenePath); loading.completed += (asyncOperation) => InitializeScene(data); }
public void StartEncounter(User user, ILoadingScreen loadingScreen, WaitableTask <IMenuEncountersInfo> encounters, int recordNumber) { loadingScreen.Show(); ImageHolder.BeginHoldingData(); var encounter = GetEncounter(user, encounters, recordNumber); var loadingSceneInfo = new LoadingReaderSceneInfo(user, loadingScreen, encounter); SceneStarter.StartScene(loadingSceneInfo); }
protected virtual void Initialize(object sender, WriterSceneInfoSelectedEventArgs e) { var sceneInfo = e.SceneInfo; var encounterStatus = new EncounterStatus(new EncounterBasicStatus(), new EncounterContentStatus()); var encounter = new UserEncounter(sceneInfo.User, sceneInfo.Encounter, encounterStatus); var encounterResult = new WaitableTask <UserEncounter>(encounter); var loadingInfo = new LoadingReaderSceneInfo(sceneInfo.User, sceneInfo.LoadingScreen, encounterResult); LoadingReaderSceneInfoSelector.Select(this, new LoadingReaderSceneInfoSelectedEventArgs(loadingInfo)); }
protected virtual void InitializeScene(LoadingReaderSceneInfo data) { if (SceneManager <LoadingReaderSceneInfo> .Instance == null) { Debug.LogError("Started scene UI is not Reader."); return; } SceneManager <LoadingReaderSceneInfo> .Instance.Display(data); }
protected virtual void StartReader() { SceneInfoSelector.CurrentValue.SceneInfo.Encounter.Content.NonImageContent.SetCurrentSection(SectionSelector.CurrentValue.SelectedSection); SectionSelector.CurrentValue.SelectedSection.SetCurrentTab(TabSelector.CurrentValue.SelectedTab); SignalBus.Fire <SerializeEncounterSignal>(); var sceneInfo = SceneInfoSelector.CurrentValue.SceneInfo; var encounterStatus = new EncounterStatus(new EncounterBasicStatus(), new EncounterContentStatus()); var encounter = new UserEncounter(sceneInfo.User, sceneInfo.Encounter, encounterStatus); var encounterResult = new WaitableTask <UserEncounter>(encounter); var loadingInfo = new LoadingReaderSceneInfo(sceneInfo.User, sceneInfo.LoadingScreen, encounterResult); ReaderSceneStarter.StartScene(loadingInfo); }
protected virtual void MetadataSelected(MenuSceneInfo sceneInfo, EncounterBasicStatus status, KeyValuePair <SaveType, EncounterMetadata> metadata) { if (status == null) { status = new EncounterBasicStatus(); } ImageHolder.BeginHoldingData(); ImageHolder.HoldImage(metadata.Value.Sprite); var encounter = EncounterReader.GetUserEncounter(sceneInfo.User, metadata.Value, status, metadata.Key); var encounterSceneInfo = new LoadingReaderSceneInfo(sceneInfo.User, sceneInfo.LoadingScreen, encounter); SceneStarter.StartScene(encounterSceneInfo); }
public LoadingReaderSceneInfoSelectedEventArgs(LoadingReaderSceneInfo sceneInfo) => SceneInfo = sceneInfo;