好的,我想要的是在我之后从窗口模式切换到全屏的代码,gameState.gameLoading
所以下一个gameState.mainMenu
状态是全屏。我怎么做?我的代码是:变量:
//Game States
public enum gameState
{
gameLoading,
mainMenu,
gameOptions,
levelSelect,
gamePlaying,
gameOver
}
gameState CurrentGameState = gameState.gameLoading;
Update()
方法:
if (CurrentGameState != gameState.gameLoading)
{
IsMouseVisible = false;
graphics.IsFullScreen = true;
}
if (CurrentGameState == gameState.gameLoading)
{
IsMouseVisible = true;
graphics.IsFullScreen = false;
}
但它不起作用。有什么建议么?