public void PointerEnterCard(CardItem card) { if (canOperate) { if (seletedCards.Contains(card)) { startAdd = false; startRem = true; lastRemovedCard = card; seletedCards.Remove(card); card.BeingSelect(false); if (seletedCards.Contains(lastAddCard) && lastAddCard != null && startRem) { seletedCards.Remove(lastAddCard); lastAddCard.BeingSelect(false); } } else { startAdd = true; startRem = false; lastAddCard = card; seletedCards.Add(card); card.BeingSelect(true); if (!seletedCards.Contains(lastRemovedCard) && lastRemovedCard != null && startAdd) { seletedCards.Add(lastRemovedCard); lastAddCard.BeingSelect(true); lastRemovedCard = null; } } } }
public void PointerExitCard(CardItem card) { //什么情况下,离开了也Add呢 if (canOperate) { if (!seletedCards.Contains(card)) { if (card == firstAddCard) { seletedCards.Add(card); card.BeingSelect(true); } } } }