Exemplo n.º 1
0
        private void InitData()
        {
            CardPB cardPb = GlobalData.CardModel.GetCardBase(CardId);

            Name       = cardPb.CardName;
            Credit     = cardPb.Credit;
            RequireNum = cardPb.Puzzle;
            Player     = cardPb.Player;
            Name       = CardVo.SpliceCardName(Name, cardPb.Player);
            CardVo     = new CardVo();
            CardVo.InitData(cardPb);
            var vo = GlobalData.CardModel.GetUserCardById(CardId);

            CardPath = vo != null?CardVo.SmallCardPath(vo.UserNeedShowEvoCard() && vo.Level > 60) : CardVo.SmallCardPath();
        }
Exemplo n.º 2
0
        public void SetData(AppointmentRuleVo vo)
        {
            _tips.text = I18NManager.Get("LoveAppointment_NoRoleWindowTips");//"获得此星缘可解锁恋爱剧情";

            for (int i = 0; i < _btnGroup.childCount; i++)
            {
                Transform roleStory = _btnGroup.GetChild(i);
                //Debug.LogError(vo.ActiveCards[i]);
                if (vo.ActiveCards[i] <= 0)
                {
                    continue;
                }
                _btnGroup.GetChild(i).gameObject.Show();
                RawImage role      = roleStory.Find("RoleImage").GetComponent <RawImage>();
                Text     storyName = roleStory.Find("Text").GetComponent <Text>();
                var      card      = GlobalData.CardModel.GetCardBase(vo.ActiveCards[i]);
                role.texture   = ResourceManager.Load <Texture>("Card/Image/MiddleCard/" + vo.ActiveCards[i], ModuleConfig.MODULE_LOVEAPPOINTMENT);
                storyName.text = CardVo.SpliceCardName(card.CardName, card.Player);
            }
        }