public void LeftCardsShow(bool state) { _leftNumber.SetActive(state); if (_bgSprite && _layout) { _bgSprite.height = (int)(_layout.GetChildList().Count *_layout.Height); } }
/// <summary> /// 处理其它牌 /// </summary> private void DealOtherCards() { if (_showOtherCards != null) { List <Transform> list; if (_otherCards != null) { list = _otherCards.GetChildList(); } else { YxDebug.LogError("小结算的其它牌的处理那块没弄啊,自己去加上"); return; } List <int> baos = new List <int>(); if (Manager.LaiZiNum != 0 && Manager.FanNum != 0) { baos.Add(Manager.LaiZiNum); } if (Manager.BaoCards.Count > 0) { baos = Manager.BaoCards; } if (baos.Count > 0) { _showOtherCards.SetActive(true); for (int i = 0, lenth = list.Count, baoCount = baos.Count; i < lenth; i++) { if (baoCount > i) { GameTools.SetMahjongValueByTrans(list[i], (EnumMahjongValue)baos[i]); } else { list[i].gameObject.SetActive(false); } } } else { _showOtherCards.SetActive(false); } } }