mNetworkSession = NetworkSession.EndCreate(result);\r
mNetworkSession.AllowHostMigration = true;\r
mNetworkSession.AllowJoinInProgress = false;\r
-\r
+ mNetworkSession.GameStarted += new EventHandler<GameStartedEventArgs>(mNetworkSession_GameStarted);\r
mJoinedSessionDelegate(mNetworkSession, this);\r
}\r
\r
+\r
+ //gamestarted event\r
+ void mNetworkSession_GameStarted(object sender, GameStartedEventArgs e)\r
+ {\r
+ Reset();\r
+ }\r
+\r
/// <summary>\r
/// Determine whether or not the network game object is associated with any network session.\r
/// </summary>\r
if (mNetworkSession.SessionState == NetworkSessionState.Lobby)\r
{\r
mLobby.Update(gameTime, this);\r
-\r
- //if state started as lobby and was changed to playing, call reset.\r
- if (mNetworkSession.SessionState == NetworkSessionState.Playing)\r
- Reset();\r
}\r
else if (mNetworkSession.SessionState == NetworkSessionState.Playing)\r
{\r