/// <summary> /// 开局 /// </summary> /// <param name="proto"></param> public void Begin(JY_ROOM_GAMESTART proto) { Debug.Log("开局------------proto.baseScore;------------------------" + proto.baseScore); CurrentRoom.roomStatus = ROOM_STATUS.GAME; if (proto.hasBaseScore()) { CurrentRoom.baseScore = proto.baseScore; } if (proto.hasLoop()) { CurrentRoom.currentLoop = proto.loop; } List <JY_SEAT> seatList = proto.getSeatListList(); for (int i = 0; i < seatList.Count; i++) { if (seatList[i] != null && seatList[i].playerId > 0) { SeatEntity seat = GetSeatByPlayerId(seatList[i].playerId); seat.SetSeat(seatList[i]); Debug.Log("开局------------seat.gold;------------------------" + seat.Gold); } } SendRoomInfoChangeNotify(); }
/// <summary> /// 服务器广播开局 /// </summary> /// <param name="obj"></param> private void OnServerBroadcastBegin(byte[] obj) { JY_ROOM_GAMESTART proto = JY_ROOM_GAMESTART.decode(obj); RoomJuYouProxy.Instance.Begin(proto); if (JuYouSceneCtrl.Instance != null) { JuYouSceneCtrl.Instance.Begin(RoomJuYouProxy.Instance.CurrentRoom, true); } }