Example #1
0
 public void LoadCardList(GameContainerItem cardDeck)
 {
     for (int i = 0; i < cardDeck.cardEntryList.Count; i++)
     {
         CardEntry    card         = cardDeck.cardEntryList[i];
         CardHeadView cardHeadView = null;
         bool         isAdd        = true;
         if (i < cardHeadViews.Count)
         {
             cardHeadView = cardHeadViews[i];
             isAdd        = false;
         }
         else
         {
             cardHeadView = Instantiate <CardHeadView>(cardHeadPrefab);
             Vector3 position = new Vector3();
             cardHeadView.transform.SetParent(transform, false);
             cardHeadView.transform.localPosition = position;
         }
         cardHeadView.LoadCard(card);
         if (isAdd)
         {
             cardHeadViews.Add(cardHeadView);
         }
     }
 }
Example #2
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     if (parameterMap["OtherType"] == "CardHeadView")
     {
         CardHeadView cardHeadView = body as CardHeadView;
         this.cardEntryShow = cardHeadView.card;
         this.LoadCardInfo(cardHeadView.card);
     }
     else if (parameterMap["OtherType"] == "MinionCellView")
     {
         MinionCellView minionCellView = body as MinionCellView;
         this.cardEntryShow = minionCellView.minionCellItem;
         LoadingAllInfoByMinionCellView(minionCellView);
     }
 }