break;\r
}\r
}\r
+ if(allReady && players.Count == 2 && localPlayer == players[0])\r
+ {\r
+ if (currentKeyboardState.IsKeyDown(Keys.B) && previousKeyboardState.IsKeyUp(Keys.B))\r
+ {\r
+ networkGame.StartGame();\r
+ }\r
+ }\r
}\r
else\r
currentState = lobbyState.Welcome;\r
\r
case lobbyState.Connected:\r
DrawPlayerList(spriteBatch);\r
- \r
+ \r
if(allReady && players.Count == 2 && localPlayer == players[0])\r
spriteBatch.DrawString(menuFont, "Press B to begin game!", new Vector2(MaxX / 2, MaxY / 2), Color.White, 0f, zero, .7f, SpriteEffects.None, 0.5f);\r
else if(allReady)\r
return mNetworkSession;\r
}\r
\r
+ // added to begin the game. I made the LobbyGUI make sure that only the host will call it when everyone is ready.\r
+ // This is already taken care of in the update method below. But it may be nice to allow the host to signal the start\r
+ // rather then having it start automatically. Just a suggestion. \r
+ // -Brady\r
+ public void StartGame()\r
+ {\r
+ mNetworkSession.StartGame();\r
+ }\r
\r
public void LeaveSession()\r
{\r