public static TipsDataGroup GetVisibleTips(bool onlyNew, bool global) { TipsDataGroup tipsDataGroup = new TipsDataGroup(); BurikoMemory instance = BurikoMemory.Instance; if (global) { int num = instance.GetGlobalFlag("GTotalTips").IntValue(); if (instance.GetGlobalFlag("GFlag_GameClear").BoolValue()) { num = 999; } Debug.Log("Displaying tips up to " + num); { foreach (TipsDataEntry tip in Tips) { if (tip.Id < num) { tipsDataGroup.TipsAvailable++; tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(tip); } } return(tipsDataGroup); } } int num2 = instance.GetFlag("NewTipsStart").IntValue(); int num3 = num2 + instance.GetFlag("NewTipsCount").IntValue(); Debug.Log("Displaying tips " + num2 + " to " + num3); for (int i = 0; i < Tips.Count; i++) { int id = Tips[i].Id; if (onlyNew) { if (id >= num2 && id < num3) { tipsDataGroup.TipsAvailable++; tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(Tips[i]); } } else if (id < num3) { tipsDataGroup.TipsAvailable++; tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(Tips[i]); } } return(tipsDataGroup); }
public static TipsDataGroup GetVisibleTips(bool onlyNew, bool global) { TipsDataGroup tipsDataGroup = new TipsDataGroup(); BurikoMemory instance = BurikoMemory.Instance; if (global) { int num = instance.GetGlobalFlag("GOnikakushiDay").IntValue(); { foreach (TipsDataEntry tip in Tips) { tipsDataGroup.TipsAvailable++; if (tip.UnlockChapter <= num) { tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(tip); } } return(tipsDataGroup); } } int num2 = instance.GetFlag("LOnikakushiDay").IntValue(); Debug.Log("current chapter " + num2); foreach (TipsDataEntry tip2 in Tips) { if (onlyNew) { if (tip2.UnlockChapter == num2) { tipsDataGroup.TipsAvailable++; tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(tip2); } } else if (tip2.UnlockChapter <= num2) { tipsDataGroup.TipsAvailable++; tipsDataGroup.TipsUnlocked++; tipsDataGroup.Tips.Add(tip2); } } return(tipsDataGroup); }
public void Show(int tipstype) { LTDescr lTDescr = LeanTween.value(base.gameObject, SetFade, 0f, 1f, 0.8f); lTDescr.onComplete = delegate { GameSystem.Instance.AudioController.PlayAudio("msys14.ogg", Assets.Scripts.Core.Audio.AudioType.BGM, 0, 0.7f, 0f); }; switch (tipstype) { case 0: tipsData = TipsData.GetVisibleTips(onlyNew: false, global: false); break; case 1: tipsData = TipsData.GetVisibleTips(onlyNew: true, global: false); break; case 2: tipsData = TipsData.GetVisibleTips(onlyNew: false, global: true); break; default: throw new ArgumentOutOfRangeException("tipstype for TipsManager.Show() must be between 0 and 2 (" + tipstype + " given)"); } page = 0; numPages = tipsData.TipsAvailable / 8; if (numPages >= ReturnPage) { page = ReturnPage; } UpdateEntries(); TipsButtons.ForEach(delegate(TipsButton a) { a.Setup(this); }); }