KeyboardState previousKeyboardState;\r
KeyboardState currentKeyboardState;\r
\r
- GamerCollection<LocalNetworkGamer> players;\r
+ GamerCollection<NetworkGamer> players;\r
AvailableNetworkSessionCollection availableSessions;\r
\r
int selectedSessionIndex;\r
{\r
currentState = lobbyState.Connected;\r
networkGame.CreateSession(4);\r
- players = networkGame.LocalGamers;\r
} \r
break;\r
\r
ready = false;\r
}\r
availableSessions = networkGame.FindSessions();\r
+ if (availableSessions != null)\r
+ {\r
+ networkGame.JoinSession(availableSessions[0]);\r
+ currentState = lobbyState.Connected;\r
\r
+ availableSessions.Dispose();\r
+ availableSessions = null;\r
+ }\r
break;\r
\r
case lobbyState.Connected:\r
}\r
if (currentKeyboardState.IsKeyDown(Keys.R) && previousKeyboardState.IsKeyUp(Keys.R))\r
ready = true;\r
+\r
+ if (networkGame.sessionExists())\r
+ {\r
+ players = networkGame.LocalGamers;\r
+ }\r
+ else\r
+ currentState = lobbyState.Welcome;\r
+\r
+\r
break;\r
\r
}\r
color = Color.Red;\r
\r
spriteBatch.DrawString(menuFont, availableSessions[sessionIndex].HostGamertag, new Vector2(150, 100 + sessionIndex * menuFont.LineSpacing), color, 0f, zero, .7f, SpriteEffects.None, 0.5f);\r
- spriteBatch.DrawString(menuFont, availableSessions[sessionIndex].CurrentGamerCount + " / " + availableSessions[sessionIndex].OpenPublicGamerSlots, new Vector2(400, 300 + sessionIndex * menuFont.LineSpacing), color, 0f, zero, .7f, SpriteEffects.None, 0.5f);\r
- spriteBatch.DrawString(menuFont, availableSessions[sessionIndex].QualityOfService + "", new Vector2(350, 100 + sessionIndex * menuFont.LineSpacing), color, 0f, zero, .7f, SpriteEffects.None, 0.5f);\r
+ spriteBatch.DrawString(menuFont, availableSessions[sessionIndex].CurrentGamerCount + " / " + availableSessions[sessionIndex].OpenPublicGamerSlots + availableSessions[sessionIndex].OpenPrivateGamerSlots,\r
+ new Vector2(400, 100 + sessionIndex * menuFont.LineSpacing), color, 0f, zero, .7f, SpriteEffects.None, 0.5f);\r
}\r
}\r
break;\r