Exemple #1
0
 public void onClickServant(Servant servant, PointerEventData pointer)
 {
     if (isSelectingTarget)
     {
         if (_usingCard.isValidTarget(game, servant.card))
         {
             player.cmdUse(game, _usingCard, _usingPosition, servant.card);
             resetUse(false, false);
         }
         else
         {
             showTip("这不是一个有效的目标!");
             resetUse(true, true);
         }
     }
 }
Exemple #2
0
 public override bool update(Table table)
 {
     foreach (var p in eventArg.infoDic)
     {
         if (p.Value.player == table.player)
         {
             Servant servant = table.SelfFieldList.FirstOrDefault(s => s.card == p.Key);
             if (servant != null)
             {
                 table.SelfFieldList.removeItem(servant);
             }
         }
         else
         {
             Servant servant = table.EnemyFieldList.FirstOrDefault(s => s.card == p.Key);
             if (servant != null)
             {
                 table.EnemyFieldList.removeItem(servant);
             }
         }
     }
     return(true);
 }