public void CardOnPushUp(CardParts parts) { if (pushDownCardParts == null) {return;} pushDownCardParts = null; cardPartsPushUp(); }
public void CardOnPushDown(CardParts parts) { pushDownCardParts = parts; cardPartsPushDown(parts.GetCard()); }
public void CardClick(CardParts parts) { cardPartsClick(parts); }
private void CardPartsClick(CardParts parts) { if (!isTouchLock) {return;} if (parts.isSelected) { UnsetCard(parts); } else if (!IsAllCardSet()) { SetCard(parts); } UpdateStartBattleButton(); }
private void UnsetCard(CardParts cardParts) { cardParts.Deselected(); selectedCardParts[Array.IndexOf(selectedCardParts, cardParts)] = null; }
private void SetCard(CardParts cardParts) { int index = NextIndex(); selectedCardParts[index] = cardParts; cardParts.Selected(SELECTED_CARD_ORDER_TEXTS[index]); }