示例#1
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();
 }
示例#2
0
    public HeadFrameVo(ElementPB pb)
    {
        Id            = pb.Id;
        ElementType   = pb.ElementType;
        ElementModule = pb.ElementModule;
        Name          = pb.Name;
        UnlockClaim   = pb.UnlockClaim;
        Desc          = pb.Desc;
        SetIsUnlock();
        Path = "HeadFrame/" + pb.Id;
        Key  = GlobalData.PlayerModel.PlayerVo.UserId + Id + "";
        SetRedDot();

        if (!IsUnlock)
        {
            Sort = 1;
        }
    }
示例#3
0
        /// <summary>
        /// 获取解锁unlockeds和未解锁lockeds的元素
        /// </summary>
        /// <param name="pbType"></param>
        /// <param name="unlockeds"></param>
        /// <param name="lockeds"></param>
        public void GetElementByType(ElementTypePB pbType, ElementModulePB moduleType, ref List <ElementPB> unlockeds,
                                     ref List <ElementPB> lockeds)
        {
            //fen 两个队列返回
            if (unlockeds != null)
            {
                unlockeds.Clear();
            }

            if (lockeds != null)
            {
                lockeds.Clear();
            }

            ElementPB pb;

            for (int i = 0; i < _rules.Count; i++)
            {
                pb = _rules[i];
                if (pb.ElementType != pbType || pb.ElementModule != moduleType)
                {
                    continue;
                }

                if (IsCanUseElement(pb.Id)) //pb.Gem == 0免费
                {
                    if (unlockeds == null)
                    {
                        continue;
                    }
                    unlockeds.Add(pb);
                }
                else
                {
                    if (lockeds == null)
                    {
                        continue;
                    }
                    lockeds.Add(pb);
                }
            }

            return;
        }