/// <summary> /// 每个玩家显示层发牌 /// </summary> public void InitPayerLibrary() { fapaiObj.SetActive(true); UIUtils.DelayDesOrDisObject(fapaiObj, 2f, false); for (int i = 0; i < LandlordsModel.Instance.RoomPlayerHands.Count; i++) { LandkirdsHandCardModel handCard = LandlordsModel.Instance.RoomPlayerHands[i]; if (handCard != null) { LandlordsBasePlayer player = GetPlayer(handCard.playerInfo.uid); player.DealCard(true); if (player is LandlordsOtherPlayer) { ((LandlordsOtherPlayer)player).CardRemainCountShow(); } } } LandlordsPage.Instance.LoadComplete(); }
/// <summary> /// 玩家变成地主 /// </summary> public void PlayerToLandlord(string uid, bool isAddCardCountToPlayer = true) { LandkirdsHandCardModel cards = LandlordsModel.Instance.GetHandCardMode(uid); LandlordsModel.Instance.CurLandlordUid = uid; if (LandlordsModel.Instance.RoomModel.CurRoomInfo.IsMatch && !LandlordsModel.Instance.RoomModel.CurRoomInfo.IsQdz) { Multiples = cards.Multiples; } List <Card> dipai = new List <Card>(); //显示底牌 while (DzCard.Instance.CardsCount != 0) { Card card = DzCard.Instance.Deal(); dipai.Add(card); if (isAddCardCountToPlayer) { cards.AddCard(card); } } UpdateDeskCardShow(dipai); for (int i = 0; i < dipai.Count; i++) { dipai[i].IsSprite = false; } LandlordsBasePlayer playCard = LandlordsPage.Instance.playView.GetPlayer(uid); if (uid == UserInfoModel.userInfo.userId.ToString()) { playCard.DealCard(faceBundle); } if (playCard is LandlordsOtherPlayer) { ((LandlordsOtherPlayer)playCard).CardRemainCountShow(); } //更新身份 UpdateIndentity(uid, Identity.Landlord); }