本文整理汇总了C#中StateManager.SetState方法的典型用法代码示例。如果您正苦于以下问题:C# StateManager.SetState方法的具体用法?C# StateManager.SetState怎么用?C# StateManager.SetState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StateManager
的用法示例。
在下文中一共展示了StateManager.SetState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
// Intro sounds
audioManager.addEffect(audioList.getValue("Intro", "startup"), "intro_startup");
// Main Menu Sounds
audioManager.addEffect(audioList.getValue("MainMenu", "move"), "menu_move");
audioManager.addEffect(audioList.getValue("MainMenu", "select"), "menu_select");
audioManager.addEffect(audioList.getValue("MainMenu", "start"), "menu_start");
audioManager.addSong(audioList.getValue("MainMenu", "music"), "menu_music");
// World Map Sounds
audioManager.addEffect(audioList.getValue("WorldMap", "select"), "map_select");
audioManager.addEffect(audioList.getValue("WorldMap", "move"), "map_move");
audioManager.addEffect(audioList.getValue("WorldMap", "selectMap"), "map_select_map");
audioManager.addEffect(audioList.getValue("WorldMap", "back"), "map_back");
audioManager.addSong(audioList.getValue("WorldMap", "music"), "map_music");
// In Game Sounds
audioManager.addEffect(audioList.getValue("InGame", "player_shoot"), "player_shoot");
audioManager.addEffect(audioList.getValue("InGame", "player_die"), "player_die");
audioManager.addEffect(audioList.getValue("InGame", "player_powerup_pickup"), "player_powerup_pickup");
audioManager.addEffect(audioList.getValue("InGame", "dark_thought_shoot"), "dark_thought_shoot");
audioManager.addEffect(audioList.getValue("InGame", "dark_thought_die"), "dark_thought_die");
audioManager.addEffect(audioList.getValue("InGame", "red_bloodvessel_die"), "red_bloodvessel_die");
audioManager.addEffect(audioList.getValue("InGame", "blue_bloodvessel_die"), "blue_bloodvessel_die");
audioManager.addEffect(audioList.getValue("InGame", "purple_bloodvessel_die"), "purple_bloodvessel_die");
audioManager.addEffect(audioList.getValue("InGame", "nightmare_die"), "nightmare_die");
audioManager.addEffect(audioList.getValue("InGame", "nightmare_hit"), "nightmare_hit");
audioManager.addEffect(audioList.getValue("InGame", "inner_demon_die"), "inner_demon_die");
audioManager.addEffect(audioList.getValue("InGame", "lesser_demon_spawn"), "lesser_demon_spawn");
audioManager.addEffect(audioList.getValue("InGame", "lesser_demon_die"), "lesser_demon_die");
audioManager.addEffect(audioList.getValue("InGame", "dark_whisper_die"), "dark_whisper_die");
audioManager.addEffect(audioList.getValue("InGame", "dark_whisper_release_spikes"), "release_spikes");
audioManager.addEffect(audioList.getValue("InGame", "pause_appear"), "pause_appear");
audioManager.addSong(audioList.getValue("InGame", "music"), "main_music");
audioManager.addSong(audioList.getValue("InGame", "music_secondary"), "secondary_music");
stateManager = new StateManager();
controls = new InputManager(this);
State state = new IntroState(spriteBatch, this, audioManager, controls, "IntroState");
stateManager.AddState(state);
state = new MenuState(spriteBatch, this, graphics, displayModes, audioManager, controls, "MenuState");
stateManager.AddState(state);
state = new CreditsState(spriteBatch, this, audioManager, controls, "CreditsState");
stateManager.AddState(state);
state = new WorldMapState(spriteBatch, this, audioManager, controls, "WorldMapState");
stateManager.AddState(state);
state = new PlayState(spriteBatch, this, audioManager, controls, "PlayState");
stateManager.AddState(state);
state = new WarningState(spriteBatch, this, audioManager, controls, "WarningState");
stateManager.AddState(state);
stateManager.SetState(config.getValue("General", "StartState"));
}