Exemplo n.º 1
0
 public static bool ShowLockMessage(int playerLv, int playerVipRank, UnlockTargets target)
 {
     foreach (UnlockParam unlock in MonoSingleton <GameManager> .Instance.MasterParam.Unlocks)
     {
         if (unlock != null && unlock.UnlockTarget == target)
         {
             return(LevelLock.ShowLockMessage(playerLv, unlock.PlayerLevel, playerVipRank, unlock.VipRank));
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 public bool Deserialize(JSON_UnlockParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.iname = json.iname;
     try
     {
         this.UnlockTarget = (UnlockTargets)Enum.Parse(typeof(UnlockTargets), json.iname);
     }
     catch (Exception ex)
     {
         return(false);
     }
     this.PlayerLevel = json.lv;
     this.VipRank     = json.vip;
     return(true);
 }
Exemplo n.º 3
0
        private void GotoShop(TrophyParam param)
        {
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;
            EShopType  type;

            if (string.IsNullOrEmpty(param.Objectives[0].sval_base))
            {
                type = EShopType.Normal;
            }
            else
            {
                char[] chArray = new char[1] {
                    ','
                };
                string[] strArray = param.Objectives[0].sval_base.Split(chArray);
                type = !string.IsNullOrEmpty(strArray[0]) ? (EShopType)MonoSingleton <GameManager> .Instance.MasterParam.GetShopType(strArray[0]) : EShopType.Normal;
            }
            if (type >= EShopType.Normal && player.CheckUnlockShopType(type))
            {
                switch (type)
                {
                case EShopType.Normal:
                case EShopType.Tabi:
                case EShopType.Kimagure:
                    this.trophy_window.ActivateOutputLinks(2013);
                    break;

                case EShopType.Arena:
                    this.GotoArena();
                    break;

                case EShopType.Multi:
                    this.trophy_window.ActivateOutputLinks(2005);
                    break;

                case EShopType.AwakePiece:
                    this.trophy_window.ActivateOutputLinks(2020);
                    break;

                case EShopType.Artifact:
                    this.trophy_window.ActivateOutputLinks(2021);
                    break;

                case EShopType.Event:
                    this.trophy_window.ActivateOutputLinks(2028);
                    break;

                case EShopType.Limited:
                    this.trophy_window.ActivateOutputLinks(2027);
                    break;
                }
            }
            if (type < EShopType.Normal)
            {
                return;
            }
            if (MonoSingleton <GameManager> .Instance.Player.CheckUnlockShopType(type))
            {
                return;
            }
            try
            {
                UnlockTargets unlockTargets = type.ToUnlockTargets();
                LevelLock.ShowLockMessage(player.Lv, player.VipRank, unlockTargets);
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 4
0
        private void GotoShop(TrophyParam trophy)
        {
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;
            EShopType  type   = EShopType.Normal;

            if (!string.IsNullOrEmpty(trophy.Objectives[0].sval))
            {
                char[] chArray = new char[1] {
                    ','
                };
                string[] strArray = trophy.Objectives[0].sval.Split(chArray);
                type = !string.IsNullOrEmpty(strArray[0]) ? (EShopType)MonoSingleton <GameManager> .Instance.MasterParam.GetShopType(strArray[0]) : EShopType.Normal;
            }
            if (type >= EShopType.Normal && player.CheckUnlockShopType(type))
            {
                switch (type)
                {
                case EShopType.Normal:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1013);
                    break;

                case EShopType.Tabi:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1014);
                    break;

                case EShopType.Kimagure:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1015);
                    break;

                case EShopType.Monozuki:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1016);
                    break;

                case EShopType.Tour:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1017);
                    break;

                case EShopType.Arena:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1018);
                    break;

                case EShopType.Multi:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1019);
                    break;

                case EShopType.AwakePiece:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1020);
                    break;

                case EShopType.Artifact:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1021);
                    break;
                }
            }
            if (type < EShopType.Normal)
            {
                return;
            }
            if (MonoSingleton <GameManager> .Instance.Player.CheckUnlockShopType(type))
            {
                return;
            }
            try
            {
                UnlockTargets unlockTargets = type.ToUnlockTargets();
                LevelLock.ShowLockMessage(player.Lv, player.VipRank, unlockTargets);
            }
            catch (Exception ex)
            {
            }
        }