private void SetUnselectedColor(PokerCard poker, Color unselectedColor) { if (poker == null || poker.IsSelect) { return; } poker.SetColor(unselectedColor); }
void SetCard(PokerCard card, int cardVal) { if (card == null) { return; } card.SetCardId(cardVal); card.TurnCard(); }
void SelectCard(PokerCard poker, int selectedVal) { if (poker == null) { return; } if (selectedVal == poker.Id) { poker.Selected(); } }
public void Reset() { if (LeftPoker != null) { Destroy(LeftPoker.gameObject); LeftPoker = null; } if (RightPoker != null) { Destroy(RightPoker.gameObject); RightPoker = null; } }
/// <summary> /// 接收手牌 /// </summary> public void ReceiveSmall() { if (PlayerP.Info == null) { YxDebug.LogError("用户信息为空!"); return; } PokerCard poker = RightPoker ?? LeftPoker; if (PlayerP.Info.Seat == App.GameData.SelfSeat) { //自己手牌处理 poker.transform.localScale = new Vector3(0.8f, 0.8f, 1f); poker.SetCardFront(); } }