public void ReadFromPacket(Packet packet) { turnId = packet.ReadInt(); int playerCount = packet.ReadInt(); Progresses = new CarromGameplay.PlayerProgress[playerCount]; for (int i = 0; i < playerCount; i++) { Progresses[i] = new CarromGameplay.PlayerProgress(); Progresses[i].ReadFromPacket(packet); } AwaitingTurn = (PlayerNumber)packet.ReadInt(); CoverStroke = packet.ReadBool(); WhiteCmPositions = new Vector3[MaxCmEachColor]; for (int i = 0; i < MaxCmEachColor; i++) { WhiteCmPositions[i] = packet.ReadVector3(); } BlackCmPositions = new Vector3[MaxCmEachColor]; for (int i = 0; i < MaxCmEachColor; i++) { BlackCmPositions[i] = packet.ReadVector3(); } QueenCmPosition = packet.ReadVector3(); }
public void ReadFromPacket(Packet packet) { MatchUniqueId = packet.ReadString(); int playerCount = packet.ReadInt(); for (int i = 0; i < playerCount; i++) { Progresses[i] = new CarromGameplay.PlayerProgress(); Progresses[i].ReadFromPacket(packet); } Winner = (PlayerNumber)packet.ReadInt(); }