Exemplo n.º 1
0
 private void Start()
 {
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)MonoSingleton <GameManager> .Instance, (UnityEngine.Object)null))
     {
         return;
     }
     this.m_BannerList.Clear();
     this.m_BannerList.AddRange((IEnumerable <BannerParam>)EventPopup.MakeValidBannerParams(false));
     this.Setup(this.m_BannerList.ToArray());
 }
Exemplo n.º 2
0
        private void Select(int index)
        {
            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)MonoSingleton <GameManager> .Instance))
            {
                return;
            }
            BannerParam[] array = this.m_BannerList.ToArray();
            if (array == null)
            {
                return;
            }
            if (array.Length < index)
            {
                DebugUtility.LogError("選択されたイベントバナーが正しくありません");
            }
            else
            {
                BannerParam bannerParam = array[index];
                int         pinID       = -1;
                PlayerData  player      = MonoSingleton <GameManager> .Instance.Player;
                switch (bannerParam.type)
                {
                case BannerType.storyQuest:
                    if (EventPopup.SetupQuestVariables(bannerParam.sval, true))
                    {
                        GlobalVars.SelectedQuestID = (string)null;
                        pinID = 50;
                        break;
                    }
                    break;

                case BannerType.eventQuest:
                    GlobalVars.ReqEventPageListType = GlobalVars.EventQuestListType.EventQuest;
                    EventPopup.SetupQuestVariables(bannerParam.sval, false);
                    pinID = 51;
                    break;

                case BannerType.multiQuest:
                    if (player.CheckUnlock(UnlockTargets.MultiPlay))
                    {
                        pinID = 52;
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.MultiPlay);
                    break;

                case BannerType.gacha:
                    GlobalVars.SelectedGachaTableId = bannerParam.sval;
                    pinID = 54;
                    break;

                case BannerType.shop:
                    pinID = 53;
                    break;

                case BannerType.url:
                    if (!string.IsNullOrEmpty(bannerParam.sval))
                    {
                        Application.OpenURL(bannerParam.sval);
                    }
                    pinID = 55;
                    break;

                case BannerType.towerQuest:
                    if (player.CheckUnlock(UnlockTargets.TowerQuest))
                    {
                        GlobalVars.ReqEventPageListType = GlobalVars.EventQuestListType.Tower;
                        pinID = 51;
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.TowerQuest);
                    break;

                case BannerType.arena:
                    if (player.CheckUnlock(UnlockTargets.Arena))
                    {
                        pinID = 56;
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.Arena);
                    break;

                case BannerType.pvp:
                    if (player.CheckUnlock(UnlockTargets.MultiVS))
                    {
                        pinID = 57;
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.MultiVS);
                    break;

                case BannerType.ordealQuest:
                    if (player.CheckUnlock(UnlockTargets.Ordeal))
                    {
                        pinID = 58;
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.Ordeal);
                    break;

                case BannerType.beginner:
                    pinID = 59;
                    break;
                }
                if (pinID == -1)
                {
                    return;
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, pinID);
            }
        }