internal override void OnFinishGame(Message message) { try { IsPlaying = false; isStart = false; int total = message.reader().ReadByte(); for (int i = 0; i < total; i++) { string nick = message.reader().ReadUTF(); int rank = message.reader().ReadByte(); long mn = message.reader().ReadLong(); int score = message.reader().ReadInt(); LiengPlayer pl = (LiengPlayer)GetPlayerWithName(nick); if (pl != null) { pl.SetTurn(0, false); pl.SetRank(rank); pl.IsReady = false; pl.SetShowReady(false); pl.MoneyChip = 0; if (score == 100) { pl.SetDiemBaCay("Sáp"); } else if (score == 99) { pl.SetDiemBaCay("10 Át rô"); } else { pl.SetDiemBaCay(score + ""); } //for (int j = 0; j < pl.CardHand.listCardHand.Count; j++) { //} } } SetActiveButton(false, false); OnJoinTableSuccess(masterID); tongMoney = 0; SumChipControl.MoneyChip = tongMoney; } catch (Exception ex) { Debug.LogException(ex); } }
internal override void OnNickSkip(string nick, Message msg) { try { string nick_turn = msg.reader().ReadUTF(); LiengPlayer pl = (LiengPlayer)GetPlayerWithName(nick); if (pl != null) { pl.SetEffect("Bỏ"); pl.SetTurn(0, false); pl.SetRank(4); pl.CardHand.SetAllDark(true); pl.IsPlaying = false; } pl.MoveChip(pl.MoneyChip, SumChipControl.transform.position); pl.MoneyChip = 0; SetTurn(nick_turn, msg); if (nick.Equals(ClientConfig.UserInfo.UNAME)) { SetActiveButton(); } else if (nick_turn.Equals(ClientConfig.UserInfo.UNAME)) { SetActiveButton(); baseSetTurn(); } else { hideThanhTo(); SetActiveButton(false, false, false, false); } } catch (Exception e) { Debug.LogException(e); } }