void Update() { if (matchedClientFlag && matchedHostFlag) { count++; gameSignalingHost.SendData(new ClientReceiveSignalData( new CommandData(1, CommandKind.Move, count, new object[] { Direction.Down, 5 }), MatchType.Client ) ); gameSignalingClient.SendData(new HostReceiveSignalData( new CommandData(1, CommandKind.Move, count, new object[] { Direction.Up, 1 })) ); gameSignalingClient.SendData(new HostReceiveSignalData( new CommandData(1, CommandKind.Move, count, new object[] { Direction.Up, 1 })) ); gameSignalingHost.SendData(new ClientReceiveSignalData( new CommandData(1, CommandKind.Move, count, new object[] { Direction.Down, 5 }), MatchType.Client ) ); gameSignalingClient.Update(); gameSignalingHost.Update(); } else { matchingServer1.Update(); matchingServer2.Update(); } }
void Update() { matchingClient.Update(); count++; if (count % 60 == 0) { client.WriteData("ほげ"); } if (count > 600) { client.DisConnect(); } }