本文整理汇总了C#中GameScreen.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# GameScreen.Hide方法的具体用法?C# GameScreen.Hide怎么用?C# GameScreen.Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameScreen
的用法示例。
在下文中一共展示了GameScreen.Hide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game
public Game(StartupScreen startScreen, GameScreen gameScreen)
{
this.startScreen = startScreen;
startScreen.GameStarted += OnStartupScreenGameStarted;
this.gameScreen = gameScreen;
gameScreen.Hide();
}
示例2: HandleStartScreenInput
private void HandleStartScreenInput()
{
if (CheckKey(Keys.Enter) || CheckKey(Keys.Space))
{
switch (startScreen.SelectedIndex)
{
case 0:
activeScreen.Hide();
activeScreen = selectCharScreen;
activeScreen.Show();
break;
case 1:
ingameMenuScreen.SelectedIndex = 0;
PlayerStore.Instance.loadPlayerStore("savegame.bin");
activeScreen.Hide();
activeScreen = selectCharScreen;
activeScreen.Show();
break;
case 2:
activeScreen.Hide();
//activeScreen = helpScreen;
activeScreen = loginScreen;
activeScreen.Show();
break;
case 3:
game.Exit();
break;
}
}
}
示例3: HandleSelectCharScreen
private void HandleSelectCharScreen()
{
if (CheckKey(Keys.Back) || CheckKey(Keys.Escape))
{
if (selectCharScreen.menu.EndIndex == 3)
{
activeScreen.Hide();
activeScreen = startScreen;
activeScreen.Show();
}
else
{
selectCharScreen.menu.SelectedIndex = 0;
selectCharScreen.menu.StartIndex = 0;
selectCharScreen.menu.EndIndex = 3;
}
}
else if (CheckKey(Keys.Space) || CheckKey(Keys.Enter))
{
switch (selectCharScreen.SelectedIndex)
{
case 0:
if (PlayerStore.Instance.Count > 0)
{
selectCharScreen.menu.StartIndex = 3;
selectCharScreen.menu.EndIndex = 5;
}
break;
case 1:
if (createCharScreen.initize())
{
selectCharScreen.menu.SelectedIndex = 0;
selectCharScreen.menu.StartIndex = 0;
selectCharScreen.menu.EndIndex = 3;
activeScreen.Hide();
activeScreen = createCharScreen;
activeScreen.Show();
}
break;
case 2:
case 3:
selectCharScreen.menu.SelectedIndex = 0;
selectCharScreen.menu.StartIndex = 0;
selectCharScreen.menu.EndIndex = 3;
GameWorld.GetInstance.LoadObjects(); // load client gameworld
GameWorld.GetInstance.ChangeJobClass(PlayerStore.Instance.activePlayer);
NetworkGameData.Instance.sendPlayerData("Online", PlayerStore.Instance.activePlayer);
NetworkGameData.Instance.sendScreenData("worldmap", "loading"); // inform server
activeScreen.Hide();
activeScreen = loadingScreen; // new
activeScreen.Show();
// the rest is handled by the TCPclient screendata
//NetworkGameData.Instance.sendPlayerData("Online", PlayerStore.Instance.activePlayer);
//activeScreen = actionScreen;
break;
case 4:
selectCharScreen.menu.SelectedIndex = 0;
selectCharScreen.menu.StartIndex = 0;
selectCharScreen.menu.EndIndex = 3;
activeScreen.Hide();
activeScreen = startScreen;
activeScreen.Show();
break;
}
}
}
示例4: HandleingameMenuInput
private void HandleingameMenuInput()
{
if (CheckKey(Keys.Enter))
{
switch (ingameMenuScreen.SelectedIndex)
{
case 0:
activeScreen.Hide();
//itemMenuScreen.updateItemList(); // -> move to TCPClient itemData finish inventory
itemMenuScreen.ServerReqInventory();
activeScreen = itemMenuScreen;
activeScreen.Show();
break;
case 1:
activeScreen.Hide();
activeScreen = skillScreen;
activeScreen.Show();
break;
case 2:
activeScreen.Hide();
activeScreen = equipmentMenuScreen;
activeScreen.Show();
break;
case 3:
activeScreen.Hide();
activeScreen = statusScreen;
activeScreen.Show();
break;
case 4:
activeScreen.Hide();
activeScreen = startScreen;
ingameMenuScreen.SelectedIndex = 0;
PlayerStore.Instance.savePlayerStore("savegame.bin");
activeScreen.Show();
break;
case 5:
activeScreen.Hide();
activeScreen = startScreen;
ingameMenuScreen.SelectedIndex = 0;
PlayerStore.Instance.loadPlayerStore("savegame.bin");
activeScreen.Show();
break;
case 6:
activeScreen.Hide();
activeScreen = startScreen;
ingameMenuScreen.SelectedIndex = 0;
activeScreen.Show();
break;
}
}
else if (CheckKey(Keys.Back) || CheckKey(Keys.Escape))
{
activeScreen.Hide();
activeScreen = actionScreen;
ingameMenuScreen.SelectedIndex = 0;
activeScreen.Show();
}
}