public void SetSelected(bool isSelected) { IsSelected = isSelected; BorderSelected.enabled = isSelected; card?.ShowCardBloom(isSelected); if (isSelected) { card?.BeBrightColor(); } else { card?.BeDimColor(); } }
private void UnSelectCard(CardBase card, SelectCardMethods selectCardMethod) { if (IsReadOnly) { if (Client.Instance.IsPlaying()) { NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("Notice_SelectBuildManagerSelect_CannotEditWhenPlaying"), 0, 0.1f); } else if (Client.Instance.IsMatching()) { NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("Notice_Notice_LoginMenu_ClientNeedUpdate"), 0, 0.1f); } return; } if (CurrentEditBuildButton == null) { NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("Notice_SelectBuildManagerPreviewUpgrade_PleaseCreateDeck"), 0f, 1f); return; } bool isHero = card.CardInfo.BaseInfo.CardType == CardTypes.Mech && !card.CardInfo.MechInfo.IsSoldier; Dictionary <int, SelectCard> selectCards = isHero ? SelectedHeroes : SelectedCards; int count = --selectCards[card.CardInfo.CardID].Count; card.SetBlockCountValue(count); if (selectCards[card.CardInfo.CardID].Count == 0) { selectCards[card.CardInfo.CardID].PoolRecycle(); selectCards.Remove(card.CardInfo.CardID); card.BeDimColor(); card.ShowCardBloom(false); } if (isHero) { HeroCardCount--; } else { SelectCardCount--; } if (selectCardMethod != SelectCardMethods.SwitchBuildButton) { CurrentEditBuildButton.RemoveCard(card.CardInfo.CardID); RefreshCoinLifeEnergy(); if (selectCardMethod == SelectCardMethods.CardClick) { AudioManager.Instance.SoundPlay("sfx/UnSelectCard"); } } }
public void HandCardShrink(CardBase lostFocusCard) { if (ClientPlayer == null) { return; } if (ClientPlayer.WhichPlayer == Players.Enemy) { return; } if (IsBeginDrag) { return; } lostFocusCard.transform.DOPause(); lostFocusCard.transform.localScale = Vector3.one * HAND_CARD_SIZE; if (lostFocusCard.MyColliderReplace) { lostFocusCard.transform.position = lostFocusCard.MyColliderReplace.transform.position; lostFocusCard.transform.rotation = lostFocusCard.MyColliderReplace.transform.rotation; } if (lostFocusCard.Usable) { lostFocusCard.BeBrightColor(); } else { lostFocusCard.BeDimColor(); } lostFocusCard.ResetColliderAndReplace(); currentFocusCardTickerBegin = false; UIManager.Instance.CloseUIForm <AffixPanel>(); isEnlarge = false; }