示例#1
0
        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);
        }
示例#2
0
        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);
        }