2011-09-07 34 views
0

在一個新的XNA遊戲我wroted這樣的:Guide.ShowSignIn(1,假)值不在範圍內的異常

GamerServicesComponent gsc = new GamerServicesComponent(this); 
gsc.Initialize(); 
Components.Add(gsc); 

if(!GamerServicesDispatcher.IsInitialized) 
    GamerServicesDispatcher.Initialize(Services); 

而且在更新方法

if (Keyboard.GetState().IsKeyDown(Keys.S)) 
    if (!Guide.IsVisible) 
     Guide.ShowSignIn(1, false); // true doesn't solve it nor 2 or 4 as paneCount 

我收到

Value does not fall within the expected range. 

有人嗎?

回答

0

看來Guide.ShowSignIn()不能再使用了。我不知道原因,也不知道它是否屬實。但是我無法使用ShowSignIn。我不得不登錄的方式是按Home鍵。 本指南將出現,您只需按照指南登錄。

0

在調用Guide.ShowSignIn()之前等待幾幀。我直到我的遊戲加載了所有資源並且至少已經渲染了我的幀才調用它。

相關問題