コード例 #1
0
 /// <summary> 是否能攻击 </summary>
 /// <param name="pos"> 卡牌在手卡中的序号 </param>
 public int Attackable(int pos)
 {
     Card.Card card = handCards[pos];
     if (!card.attack)
     {
         return(-1);
     }
     if (card.concentrate && card.concentrate.concentrateCount < card.concentrate.threshold)
     {
         return(-1);
     }
     if (concentratedCards.Contains(card))
     {
         return(-1);
     }
     if (player.actionPoint < card.attack.actionPointCost)
     {
         return(-1);
     }
     return(card.attack.trails.Count);
 }
コード例 #2
0
 public void SetCard(int id)
 {
     this.id = id;
     Card.Card card = BattleManager.instance.GetPlayer().cardManager.handCards[id];
     description.text = card.description;
 }