private void MoveToDLCSlides() { try { Int32 num = 0; m_iterator.Reset(); while (m_iterator.MoveNext()) { EndingSlidesStaticData endingSlidesStaticData = (EndingSlidesStaticData)m_iterator.Current; if (!endingSlidesStaticData.DLC) { num++; } } num--; m_iterator.Reset(); for (Int32 i = 0; i < num; i++) { m_iterator.MoveNext(); } } catch (UnityException) { } }
private void SetNextSlide() { if (m_iterator.MoveNext()) { m_currentData = (EndingSlidesStaticData)m_iterator.Current; if (LegacyLogic.Instance.WorldManager.IsShowingEndingSequences && m_currentData.DLC) { ContextManager.ChangeContext(EContext.CreditsScreen); return; } if (CheckCondition(m_currentData)) { m_text.text = LocaManager.GetText(m_currentData.TextKey); Texture texture = Helper.ResourcesLoad <Texture>("EndingSlides/" + m_currentData.Image); if (m_texture.mainTexture != texture) { Texture mainTexture = m_texture.mainTexture; m_texture.mainTexture = texture; if (mainTexture != null) { mainTexture.UnloadAsset(); } } m_state.ChangeState(EState.FADEIN_BACKGROUND); } else { SetNextSlide(); } } else { ContextManager.ChangeContext(EContext.Diploma); } }
private Boolean CheckCondition(EndingSlidesStaticData p_data) { Boolean flag = true; if (p_data.Quest > 0) { flag &= (LegacyLogic.Instance.WorldManager.QuestHandler.GetStep(p_data.Quest).QuestState == EQuestState.SOLVED); } if (p_data.Tokens.Length > 0) { foreach (Int32 p_id in p_data.Tokens) { flag &= (LegacyLogic.Instance.WorldManager.Party.TokenHandler.GetTokens(p_id) > 0); } } return(flag == p_data.Result); }