public void InitUserGameState(ISFSObject data) { var gdata = App.GetGameData <SssGameData>(); if (data.ContainsKey("isput")) { SssPlayer user = gdata.GetPlayer <SssPlayer>(data.GetInt("seat"), true); Dealer.FaPai(user); //为玩家创建13张手牌 int isput = data.GetInt("isput"); if (isput > 0) { user.MoveHandCardNoAnim(); } else { //播放等待动画 user.RepositionCards(); user.Waitting(); } } //比牌阶段,所有人直接显示所有手牌 else if (data.ContainsKey("duns")) { SssPlayer user = gdata.GetPlayer <SssPlayer>(data.GetInt("seat"), true); Dealer.FaPai(user); user.MoveHandCardNoAnim(); ISFSObject duns = data.GetSFSObject("duns"); ISFSArray dunsInfo = duns.GetSFSArray("duninfo"); var cardsValList = dunsInfo.Cast <ISFSObject>().SelectMany(dun => dun.GetIntArray("cards")).ToList(); user.ShowAllHandPoker(cardsValList); } //自己会有手牌,是选牌阶段 if (data.ContainsKey("cards")) { if (data.ContainsKey("isput") && data.GetInt("isput") == 0) { ChoiseMgr.ShowChoiseView(data); } } //比牌阶段初始化 if (data.ContainsKey("userscore")) { TurnRes.InitTurnResultInfo(data.GetSFSObject("userscore")); TurnRes.ShowAllResultItem(); } if (data.ContainsKey("score")) { int seat = data.GetInt("seat"); int score = data.GetInt("score"); if (score > 0) { ResultMgr.WinSeats.Add(seat); gdata.GetPlayer <SssPlayer>(seat, true).ShowResultLabel(score); } else if (score < 0) { ResultMgr.LoseSeats.Add(seat); gdata.GetPlayer <SssPlayer>(seat, true).ShowResultLabel(score); } } }