示例#1
0
 public TrainingRoomCardVo(UserCardVo vo)
 {
     IsChoose    = false;
     UserCardVo  = vo;
     AbilityNum  = GetAbilityNum();
     AbilityDesc = GlobalData.TrainingRoomModel.GetAbility(GlobalData.TrainingRoomModel.CurMusicGame.NeedAbility);
 }
示例#2
0
    /// <summary>
    /// 大图背景设置
    /// </summary>
    /// <param name="userCardVo"></param>
    public void SetCardBg(UserCardVo userCardVo)
    {
        _curEvo = userCardVo.UseEvo;
        _cardId = userCardVo.CardId;
        //_selectIcon.SetActive(userCardVo.UseEvo != EvolutionPB.Evo0);
        //_evolaterToggle.isOn = userCardVo.UseEvo >= (userCardVo.CardVo.NewViewEvo);
        _cardfaceText.text = I18NManager.Get("Card_CardFace");//userCardVo.UseEvo != EvolutionPB.Evo0 ?  I18NManager.Get("Card_CardFace"):I18NManager.Get("Card_CardBack") ;

        Texture texture = null;

        //这个可能导致BUG?!
        if (userCardVo.UserNeedShowEvoCard())
        {
            texture = ResourceManager.Load <Texture>(userCardVo.CardVo.BigCardPath(userCardVo.UserNeedShowEvoCard()), ModuleName);
        }
        else
        {
            texture = ResourceManager.Load <Texture>(userCardVo.CardVo.BigCardPath(), ModuleName);
        }


        if (userCardVo.CardVo.Credit != CreditPB.R)
        {
            SetFadeCardBg(userCardVo.CardVo.BigCardPath(!userCardVo.UserNeedShowEvoCard()));
        }


        _heroCard.texture = texture;
    }
示例#3
0
        public void UpdateUserCardsByIdAndNum(int cardId, int Num)
        {
            ////todo 解析协议xys
            UserCardVo vo = GetUserCardById(cardId);

            if (vo != null)
            {
                //   UserCardPB pb = cards[i];
                vo.Num += Num;
            }
            else
            {
                UserCardPB pb = new UserCardPB();

                pb.UserId    = GlobalData.PlayerModel.PlayerVo.UserId;
                pb.CardId    = cardId;
                pb.Num       = Num;
                pb.Level     = 0;
                pb.Exp       = 0;
                pb.Star      = StarPB.Star0;
                pb.Evolution = EvolutionPB.Evo0;

                //vo.Num = 0;
                //vo.Evolution =0;//0
                //vo.Level = 0;//0
                //vo.Star = 0;//0
                //vo.Exp = 0;//0
                UserCardList.Add(ParseUserCardVo(pb));
            }

            UserCardList.Sort();
        }
示例#4
0
        public UserCardVo ParseUserCardVo(UserCardPB pb)
        {
            UserCardVo vo = new UserCardVo();

            vo.Level     = pb.Level;
            vo.CardId    = pb.CardId;
            vo.Evolution = pb.Evolution;
            vo.Star      = (int)pb.Star;
            vo.Num       = pb.Num;

            vo.CardVo = new CardVo();
            if (_cardBaseDataDict.ContainsKey(pb.CardId))
            {
                vo.CardVo.InitData(_cardBaseDataDict[pb.CardId]);
            }
            else
            {
                Debug.LogError(pb.CardId);
            }

            vo.CurrentLevelExp   = pb.Exp;
            vo.UseEvo            = pb.UseEvo;
            vo.Exp               = pb.Exp;
            vo.RecollectionCount = pb.MemoriesNum;

            return(vo);
        }
        private void OnCardItemClick(UserCardVo vo)
        {
            Debug.Log("1Card Item Click" + vo.CardId);

            SendMessage(new Message(MessageConst.MODULE_CARD_COLLECTION_SHOW_CARD_DETAIL_VIEW,
                                    Message.MessageReciverType.DEFAULT, vo));
        }
示例#6
0
        public void Step7()
        {
            gameObject.Show();
            Transform step7 = transform.Find("Step7");

            step7.gameObject.Show();
            step7.GetText("GuideView/DialogFrame/Text").text = I18NManager.Get("Guide_RecollectionGuideStep6");

            var propIcon = step7.Find("PhotoBg/CardContent/CardHint/PropIcon");

            GuideArrow.DoAnimation(propIcon);

            PointerClickListener.Get(propIcon.gameObject).onClick = go =>
            {
                GuideManager.SetRemoteGuideStep(GuideTypePB.CardMemoriesGuide, 1040);


                //防止网络异常先模拟数据
                UserGuidePB userGuide = new UserGuidePB()
                {
                    GuideId   = 1040,
                    GuideType = GuideTypePB.CardMemoriesGuide
                };
                GuideManager.UpdateRemoteGuide(userGuide);

                //发消息去点那个其他弹窗
                UserCardVo vo = GlobalData.CardModel.UserCardList[0];
                SendMessage(new Message(MessageConst.MODULE_RECOLLECTION_SHOW_CARD_DROP_PROP,
                                        Message.MessageReciverType.UnvarnishedTransmission, vo.CardVo.RecollectionDropItemId));
                step7.gameObject.Hide();
                gameObject.Hide();
            };
        }
示例#7
0
    private void DoChallenge(UserCardVo userCardVo, int challengeNum)
    {
        if (userCardVo.RecollectionCount == 0)  //算该卡的冲洗次数
        {
            BuyCount(userCardVo.CardId, false);
            return;
        }

        var playerGold = GlobalData.PlayerModel.PlayerVo.Gold;
        var costGold   = GlobalData.ConfigModel.GetConfigByKey(GameConfigKey.MEMORIES_CHALLENGE_CONSUME_GOLD) * challengeNum;

        var playerRecollectionEnergy = GlobalData.PlayerModel.PlayerVo.RecollectionEnergy;
        var costRecollectionEnergy   = GlobalData.ConfigModel.GetConfigByKey(GameConfigKey.MEMORIES_CHALLENGE_CONSUME_POEWR) * challengeNum;


        if (playerRecollectionEnergy >= costRecollectionEnergy && playerGold >= costGold)//体力够,金币够 发请求
        {
            SendChallengeCardMemoriesReq(userCardVo, challengeNum);
        }
        else if (playerRecollectionEnergy < costRecollectionEnergy && playerGold >= costGold)//体力不够,金币够
        {
            HandleBuyRecolletionPowerEvent();
        }
        else if (playerRecollectionEnergy >= costRecollectionEnergy && playerGold < costGold)//体力够,金币不够
        {
            FlowText.ShowMessage(I18NManager.Get("Recollection_GoldInsufficient"));
        }
        else if (playerRecollectionEnergy < costRecollectionEnergy && playerGold < costGold) //体力不够,金币不够
        {
            //优先体力
            HandleBuyRecolletionPowerEvent();
        }
    }
示例#8
0
 private void UpgradeStar(UserCardVo vo)
 {
     byte[] buffer = NetWorkManager.GetByteData(new StarUpReq {
         CardId = vo.CardId
     });
     LoadingOverlay.Instance.Show();
     NetWorkManager.Instance.Send <StarUpRes>(CMD.CARDC_STARUP, buffer, OnUpgradeStar);
 }
示例#9
0
    public override void SetData(params object[] paramsObjects)
    {
//		if (paramsObjects==null)
//		{
//			return;
//
//		}



        if (paramsObjects.Length > 0)
        {
            string targetTap = "";
            if (paramsObjects[0] is string)
            {
                targetTap = (string)paramsObjects[0];
            }

            if (paramsObjects[0].GetType() == typeof(UserCardVo))
            {
                _userCardVo = (UserCardVo)paramsObjects[0];
            }
            else if (targetTap == "CardResolve")
            {
                //临时作为跳转到星缘回溯模块
                if (_cardCollectionPanel == null)
                {
                    this.OnShow(0);
                    _cardDetailPanel?.Hide();
                    _cardCollectionPanel = new CardCollectionPanel();
                    _cardCollectionPanel.Init(this);
                    ModuleManager.Instance.Remove(ModuleConfig.MODULE_LOVEAPPOINTMENT);
                    _cardCollectionPanel.Show(0);
                    RegisterModel <DrawData>();
                    _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                    _cardCollectionPanel.SetResolveState();
                    return;
                }

                if (_cardDetailPanel != null)
                {
                    _cardDetailPanel.OnBackClick();
                    ModuleManager.Instance.Remove(ModuleConfig.MODULE_LOVEAPPOINTMENT);
                    _cardDetailPanel.EnterFromOther = true;
                    _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                    _cardCollectionPanel.SetResolveState();
                }
                else
                {
                    //todo 之后要做到切换任意一个界面!
                    state = 3;
                }
            }
        }
    }
示例#10
0
    private void SetCard(UserCardVo vo)
    {
        _userCardVo = vo;

        _cardNameTxt.text = vo.CardVo.CardName;
        _mayPlayNum       = vo.RecollectionCount;

        if (_mayPlayNum > _playNumMax)
        {
            _mayPlayNum = _playNumMax;
        }
        _consumeTxt.text = I18NManager.Get("Recollection_ResidueNum", vo.RecollectionCount, _playNumMax);

//
//        _rightPlayTxt.text = I18NManager.Get("Recollection_RightBtn",_mayPlayNum);
//        _rightPropCostTxt.text = "x " + (_propPrice * _mayPlayNum);
//        _rightGoldCostTxt.text = "x " + (_goldPrice * _mayPlayNum);
        SpecialDisposeRightBtn(vo.RecollectionCount);

        _propImg.sprite = ResourceManager.Load <Sprite>("Prop/" + vo.CardVo.RecollectionDropItemId, ModuleName);

        var isSignature = _userCardVo.SignatureCard != null;

        SetSignature(isSignature);

//
//        transform.Find("BgImage/WhiteBottomBg/Panel/PropImage/Tips/Text").GetComponent<Text>().text = I18NManager.Get("Recollection_RecollectionViewResidueNum", 3 - vo.RecollectionCount);
//           // "今日该星缘剩余次数" + (3 - vo.RecollectionCount) + "/3";
//
//            _buyBtn.gameObject.SetActive(vo.RecollectionCount>=3);
//            transform.Find("BgImage/WhiteBottomBg/Panel/PropImage/Tips/BuyDesc").gameObject.SetActive(vo.RecollectionCount>=3);
//            if (vo.RecollectionCount>=3)
//            {
//                ChangeBuyIcon();
//            }
//
//
//        Image propImage = transform.Find("BgImage/WhiteBottomBg/Panel/PropImage/Image").GetComponent<Image>();
//        propImage.sprite = ResourceManager.Load<Sprite>("Prop/" + vo.CardVo.RecollectionDropItemId,ModuleName);

        //PointerClickListener.Get(propImage.gameObject).onClick = go =>
        //{
        //    FlowText.ShowMessage(PropConst.GetTips(_userCardVo.CardVo.RecollectionDropItemId));
        //};

//        var hassignature = _userCardVo.SignatureCard != null;
//        _signature.gameObject.SetActive(hassignature);
//        if (hassignature)
//        {
//            _signature.texture = ResourceManager.Load<Texture>("Prop/Signature/sign"+_userCardVo.CardId/1000);
//
//        }
//
//        _propImage.gameObject.Show();
    }
示例#11
0
 private void Evolution(UserCardVo vo, int chooseState)
 {
     //如果不满足满级满星,就不应该发送请求。
     //FlowText.ShowMessage("确认进化");
     Debug.LogError(chooseState);
     byte[] buffer = NetWorkManager.GetByteData(new EvolutionReq()
     {
         CardId = vo.CardId, ConsumeType = chooseState
     });
     LoadingOverlay.Instance.Show();
     NetWorkManager.Instance.Send <EvolutionRes>(CMD.CARDC_EVOLUTION, buffer, OnEvolution);
 }
示例#12
0
        public RecollectionCardDropVo(CardPB pb, UserCardVo userCardVo)
        {
            CardName = CardVo.SpliceCardName(pb.CardName, pb.Player);

            CardId = pb.CardId;

            HasCard = userCardVo != null;

            Credit = pb.Credit;

            UserCardVo = userCardVo;
        }
示例#13
0
        public void InitMyCards(MyCardRes res)
        {
            UserCardList = new List <UserCardVo>();
            for (int i = 0; i < res.UserCards.Count; i++)
            {
                UserCardVo vo = ParseUserCardVo(res.UserCards[i]);
                // Debug.LogError(vo.CardId+":"+vo.RecollectionCount);
                UserCardList.Add(vo);
            }

            UserCardList.Sort();
        }
示例#14
0
    /// <summary>
    /// 判断切换升星界面还是升级界面
    /// </summary>
    /// <param name="userCardVo"></param>
    private void ChangeCondiction(UserCardVo userCardVo)
    {
        _curType = userCardVo.Level / 20 > userCardVo.Star ? AdditionType.Star : AdditionType.Level;
//        //这里可以判断升心或者升级的按钮是否可以点。
//        switch (_curType)
//        {
//            case AdditionType.Level:
//                break;
//            case AdditionType.Star:
//                break;
//        }
    }
示例#15
0
 public HeadVo(ElementPB pb)
 {
     Id            = pb.Id;
     ElementType   = pb.ElementType;
     ElementModule = pb.ElementModule;
     Name          = pb.Name;
     NeedUnlock    = pb.NeedUnlock;
     UnlockClaim   = pb.UnlockClaim;
     _userCardVo   = GlobalData.CardModel.GetUserCardById(UnlockClaim.CardId);
     Desc          = pb.Desc;
     SetPlayerTypeAndPath(pb.UnlockClaim.CardId, pb.Id);
     SetIsUnlock();
 }
示例#16
0
 private void AddExp(UserCardVo vo, int itemid, int itemnum)
 {
     _preCardVo = vo;
     //		Debug.LogError(itemid+" "+itemnum);
     byte[] buffer = NetWorkManager.GetByteData(new AddExpReq()
     {
         CardId  = vo.CardId,
         ItemId  = itemid,
         ItemNum = itemnum
     });
     LoadingOverlay.Instance.Show();
     NetWorkManager.Instance.Send <AddExpRes>(CMD.CARDC_LEVELUP, buffer, OnLevelup);
 }
    private void SetStars(UserCardVo userCardVo)
    {
        for (int i = 0; i < _heartContainer.childCount; i++)
        {
            RawImage img = _heartContainer.GetChild(i).GetComponent <RawImage>();
            img.gameObject.SetActive(i > 4 - userCardVo.Star);
        }

        for (int i = 0; i < _heartBGContainer.childCount; i++)
        {
            RawImage img = _heartBGContainer.GetChild(i).GetComponent <RawImage>();
            img.gameObject.SetActive(i > 4 - userCardVo.MaxStars);
        }
    }
示例#18
0
 private void OnCardRefresh(MyCardRes res)
 {
     GlobalData.CardModel.InitMyCards(res);
     if (View.UserCardVo != null)
     {
         UserCardVo vo = GlobalData.CardModel.GetUserCardById(View.UserCardVo.CardId);
         View.SelectedCard(vo);
     }
     else if (_model.JumpData != null)
     {
         UserCardVo vo = GlobalData.CardModel.GetUserCardById((int)_model.JumpData.PostData);
         View.SelectedCard(vo);
     }
 }
示例#19
0
    public void SelectedCard(UserCardVo vo)
    {
        _userCardVo = vo;


        _choosePhotoOnClickTra.gameObject.Show();
        _cardContent.gameObject.Show();;
        _btnContent.gameObject.Show();


        SetCard(vo);

        _cardImg.texture = ResourceManager.Load <Texture>(vo.CardVo.BigCardPath(vo.UserNeedShowEvoCard()), ModuleName);
    }
示例#20
0
    private void UpgradeRep(UserCardVo vo)
    {
        if (vo == null)
        {
            return;
        }

        byte[] buffer = NetWorkManager.GetByteData(new UpgradeReq()
        {
            CardId = vo.CardId
        });
        LoadingOverlay.Instance.Show();
        NetWorkManager.Instance.Send <UpgradeRes>(CMD.CARDC_LEVELONE, buffer, OnLevelUpOne, onLevelUpOneError);
    }
示例#21
0
    private void SendChallengeCardMemoriesReq(UserCardVo userCardVo, int challengeNum)
    {
        //为了防止网络慢,前后端数据没同步上,添加Loading界面
        LoadingOverlay.Instance.Show();

        //发送请求
        byte[] data = NetWorkManager.GetByteData(new ChallengeCardMemoriesReq
        {
            CardId       = userCardVo.CardId,
            ChallengeNum = challengeNum
        });
        //处理响应
        _httpMessage = NetWorkManager.Instance.Send <ChallengeCardMemoriesRes>(CMD.CARDMEMORIESC_CHALLENGECARDMEMORIES,
                                                                               data, OnChallengeSuccess, challengeNum);
    }
示例#22
0
 /// <summary>
 /// 切换底部道具栏
 /// </summary>
 /// <param name="userCardVo"></param>
 /// <param name="addExp"></param>
 private void ChangePropView(UserCardVo userCardVo, bool addExp = false)
 {
     if (_curType != AdditionType.Level)
     {
         //_cardDetailPropertiesView.SetData(userCardVo, _curType);
         if (addExp)
         {
             SetStarPropShow(false);
         }
         ShowUpgradeStar();
     }
     else
     {
         //_cardDetailPropertiesView.SetData(userCardVo, _curType);
         ShowUpgradeLevel();
     }
 }
示例#23
0
 private void OpenEvoWindow(UserCardVo vo)
 {
     if (_evolutionWindow == null)
     {
         _evolutionWindow = PopupManager.ShowWindow <EvolutionWindow>("Card/Prefabs/CardDetail/EvolutionWindow");
     }
     //		Debug.LogError(vo.CardId);
     _evolutionWindow.SetData(vo);
     _evolutionWindow.WindowActionCallback = evt =>
     {
         if (evt == WindowEvent.ClickOutsideToClose)
         {
             //这里要设置一下tooggle
             view.SetToggleShow(view.ToggleIndex);
         }
     };
 }
示例#24
0
    private void UpgradeOneLevel(UserCardVo vo)
    {
        if (vo == null)
        {
            return;
        }

        //_itemdic.Clear();

        int needExp         = vo.NeedExp - vo.CurrentLevelExp;
        int smallPropExp    = GlobalData.PropModel.GetPropBase(PropConst.CardUpgradePropSmall).Exp;
        int bigPropExp      = GlobalData.PropModel.GetPropBase(PropConst.CardUpgradePropBig).Exp;
        int largePropExp    = GlobalData.PropModel.GetPropBase(PropConst.CardUpgradePropLarge).Exp;
        int smallProCurNum  = GlobalData.PropModel.GetUserProp(PropConst.CardUpgradePropSmall).Num;
        int bigPropCurNum   = GlobalData.PropModel.GetUserProp(PropConst.CardUpgradePropBig).Num;
        int largePropCurNum = GlobalData.PropModel.GetUserProp(PropConst.CardUpgradePropLarge).Num;

        if (smallProCurNum * smallPropExp + bigPropCurNum * bigPropExp + largePropCurNum * largePropExp < needExp ||
            smallProCurNum * smallPropExp + bigPropCurNum * bigPropExp + largePropCurNum * largePropExp == 0)
        {
            DoGiftTrigger(vo.CardVo.Player);
            GuideManager.Hide();
            //FlowText.ShowMessage(I18NManager.Get("Card_LevelUpOneFail"));
            PopupManager.ShowConfirmWindow(
                I18NManager.Get("Card_PropLacking"),
                null,
                I18NManager.Get("Card_GotoShop"),
                I18NManager.Get("Card_GotoMainLine")
                ).WindowActionCallback = evt =>
            {
                if (evt == WindowEvent.Ok)
                {
                    ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_SHOP, false, true, 3);
                }
                if (evt == WindowEvent.Cancel)
                {
                    ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_MAIN_LINE, false, true);
                }
            };
            return;
        }

        UpgradeRep(vo);
    }
示例#25
0
        public void SetData(UserCardVo vo)
        {
            _data = vo;

            transform.Find("NameText").GetComponent <Text>().text = vo.CardVo.CardName;
            //transform.Find("QualityBg/LevelText").GetComponent<Text>().text = "Lv." + vo.Level;
            transform.Find("QualityBg/LevelText").GetComponent <Text>().text = I18NManager.Get("Recollection_Level", vo.Level);

            Transform heartBar = transform.Find("QualityBg/HeartBar");

            _cardQualityImage        = transform.Find("CardQualityImage").GetComponent <Image>();
            _cardQualityImage.sprite = AssetManager.Instance.GetSpriteAtlas(CardUtil.GetNewCreditSpritePath(vo.CardVo.Credit));
            _cardQualityImage.SetNativeSize();
            _cardQualityImage.GetComponent <RectTransform>().SetWidth(149.6f);
            _cardQualityImage.GetComponent <RectTransform>().SetHeight(80.0f);

            transform.Find("Times/Text").GetComponent <Text>().text = I18NManager.Get("Recollection_CardPropItemNum", vo.RecollectionCount);
            for (int i = 1; i < 6; i++)
            {
//                RawImage item = heartBar.GetChild(4-i).GetComponent<RawImage>();
//                float alpha = 0.5f;
//                if (vo.Star > i)
//                {
//                    alpha = 1.0f;
//                }
//                item.color = new Color(item.color.r,item.color.g,item.color.b,alpha);
//                item.gameObject.SetActive(i < vo.MaxStars);

                var heartroot = heartBar.GetChild(i);
                heartroot.gameObject.SetActive(i - 1 < vo.MaxStars);
                GameObject redheart = heartroot.Find("RedHeart").gameObject;
                redheart.SetActive(i - 1 < vo.Star);
            }

            RawImage cardImage = transform.Find("Mask/CardImage").GetComponent <RawImage>();
            Texture  texture   = ResourceManager.Load <Texture>(vo.CardVo.MiddleCardPath(vo.UserNeedShowEvoCard()));

            if (texture == null)
            {
                texture = ResourceManager.Load <Texture>(vo.CardVo.MiddleCardPath());
            }

            cardImage.texture = texture;
        }
示例#26
0
        public void Step6()
        {
            gameObject.Show();
            Transform step6 = transform.Find("Step6");

            step6.gameObject.Show();
            step6.GetText("GuideView/DialogFrame/Text").text = I18NManager.Get("Guide_RecollectionGuideStep5");

            var addBtn = step6.Find("PhotoBg/CardContent/Num/AddIcon/AddBtn");

            GuideArrow.DoAnimation(addBtn);

            PointerClickListener.Get(addBtn.gameObject).onClick = go =>
            {
                GuideManager.SetRemoteGuideStep(GuideTypePB.CardMemoriesGuide, 1030);
                //防止网络异常先模拟数据
                UserGuidePB userGuide = new UserGuidePB()
                {
                    GuideId   = 1030,
                    GuideType = GuideTypePB.CardMemoriesGuide
                };
                GuideManager.UpdateRemoteGuide(userGuide);


                //发消息去点那个增加的窗口
                UserCardVo vo = GlobalData.CardModel.UserCardList[0];
                SendMessage(new Message(MessageConst.CMD_RECOLLECTION_BUY_COUNT, Message.MessageReciverType.UnvarnishedTransmission, vo.CardId));

                step6.gameObject.Hide();
                gameObject.Hide();
            };
//
//			var arrowsRect = step5.GetRectTransform("WhiteBottomBg/Panel/Arrows");
//			var localPosition = arrowsRect.localPosition;
//			arrowsRect.DOLocalMove(new Vector2(localPosition.x + 30.0f, localPosition.y -30.0f), 0.5f).SetLoops(-1, LoopType.Yoyo);
//
//			var onClickArea = step5.Find("WhiteBottomBg/Panel/OnClickArea").gameObject;
//			PointerClickListener.Get(onClickArea).onClick = go =>
//			{
//				SendMessage(new Message(MessageConst.CMD_RECOLLECTION_SHOW_REWARD, Message.MessageReciverType.UnvarnishedTransmission));
//				gameObject.Hide();
//			};
        }
示例#27
0
    public override void Init()
    {
        GuideManager.RegisterModule(this);

        if (_userCardVo != null)
        {
            if (_cardDetailPanel == null)
            {
                _cardDetailPanel = new CardDetailPanel();
                _cardDetailPanel.Init(this);
            }
            _cardDetailPanel.Show(0);
            _cardDetailPanel.EnterFromOther = true;
            _cardDetailPanel.SetData(_userCardVo);
            _userCardVo = null;
        }
        else
        {
            //跳转回来的时候,有可能是在星缘回忆界面!
            if (_cardDetailPanel != null)
            {
                return;
            }


            if (_cardCollectionPanel == null)
            {
                _cardCollectionPanel = new CardCollectionPanel();
                _cardCollectionPanel.Init(this);
                RegisterModel <DrawData>();
                _cardCollectionPanel.Show(0);
            }

            if (state != 0)
            {
                _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                _cardCollectionPanel.SetResolveState();
            }
        }
    }
示例#28
0
        private void Step3()
        {
            Transform step3 = transform.Find("Step3");

            step3.gameObject.Show();

            var onClickArea = step3.Find("OnClickArea");

            GuideArrow.DoAnimation(onClickArea);
            PointerClickListener.Get(onClickArea.gameObject).onClick = go =>
            {
                UserCardVo vo = GlobalData.CardModel.UserCardList[0];
                SendMessage(new Message(MessageConst.MODULE_CARD_SHOW_SELECTED_CARD, Message.MessageReciverType.UnvarnishedTransmission, vo));
                //打星缘回忆的点
                GuideManager.SetRemoteGuideStep(GuideTypePB.CardMemoriesGuide, 1020);
                step3.gameObject.Hide();
                Step5();
            };

//
//			var arrowsRect = step3.GetRectTransform("WhiteBottomBg/Arrows");
//			var localPosition = arrowsRect.localPosition;
//			arrowsRect.DOLocalMove(new Vector2(localPosition.x - 30.0f, localPosition.y + 30.0f), 0.5f).SetLoops(-1, LoopType.Yoyo);
//
//			var onClickArea = step3.Find("WhiteBottomBg/OnClickArea").gameObject;
//			PointerClickListener.Get(onClickArea).onClick = go =>
//			{
//
//				//打星缘回忆的点
//
//				GuideManager.SetRemoteGuideStep(GuideTypePB.CardMemoriesGuide,1020);
//
//				//发送完三次的消息
//				UserCardVo vo = GlobalData.CardModel.UserCardList[0];
//				SendMessage(new Message(MessageConst.MODULE_RECOLLECTION_PLAY, Message.MessageReciverType.UnvarnishedTransmission, 3, vo));
//				step3.gameObject.Hide();
//
//			};
        }
示例#29
0
    private void ShowStarUpPreview(UserCardVo userCardVo)
    {
        if (_starUpPreviewWindow == null)
        {
            _starUpPreviewWindow = PopupManager.ShowWindow <StarUpPreviewWindow>("Card/Prefabs/CardDetail/StarUpPreviewWindow");
        }

        if (GlobalData.LevelModel == null)
        {
            LoadingOverlay.Instance.Show();
            GetService <LevelService>().SetCallback(levelmodel =>
            {
                Debug.LogError("no globalData");
                LoadingOverlay.Instance.Hide();
                _starUpPreviewWindow.SetData(userCardVo, levelmodel);
            }).Execute();
        }
        else
        {
            _starUpPreviewWindow.SetData(userCardVo, GlobalData.LevelModel);
        }
    }
示例#30
0
        private void Step5()
        {
            Transform step4 = transform.Find("Step4");

            step4.gameObject.Hide();

            Transform step5 = transform.Find("Step5");

            step5.gameObject.Show();
            step5.GetText("GuideView/DialogFrame/Text").text = I18NManager.Get("Guide_RecollectionGuideStep4");
            var rightBtn = step5.Find("BtnContent/RightBtn");

            GuideArrow.DoAnimation(rightBtn);
            PointerClickListener.Get(rightBtn.gameObject).onClick = go =>
            {
                UserCardVo vo = GlobalData.CardModel.UserCardList[0];
                SendMessage(new Message(MessageConst.MODULE_RECOLLECTION_PLAY, Message.MessageReciverType.UnvarnishedTransmission, 3, vo));
                step5.gameObject.Hide();
                gameObject.Hide();
            };


//
//			var arrowsRect = step4.GetRectTransform("WhiteBottomBg/Panel/Arrows");
//			var localPosition = arrowsRect.localPosition;
//			arrowsRect.DOLocalMove(new Vector2(localPosition.x + 30.0f, localPosition.y -30.0f), 0.5f).SetLoops(-1, LoopType.Yoyo);
//
//			var onClickArea = step4.Find("WhiteBottomBg/Panel/OnClickArea").gameObject;
//			PointerClickListener.Get(onClickArea).onClick = go =>
//			{
//				UserCardVo vo = GlobalData.CardModel.UserCardList[0];
//				SendMessage(new Message(MessageConst.MODULE_RECOLLECTION_SHOW_CARD_DROP_PROP, Message.MessageReciverType.UnvarnishedTransmission,
//					vo.CardVo.RecollectionDropItemId));
//
//				step4.gameObject.Hide();
//			};
        }