public MainGame() : base() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; GameContent.Initialize(this.Content); Window.Title = "LD27 - Ten Seconds Hero!"; SoundManager.SEFolder = "se"; SoundManager.BGMFolder = "bgm"; }
public MainGame() { Graphics = new GraphicsDeviceManager(this) { PreferredBackBufferWidth = 800, PreferredBackBufferHeight = 600 }; Content.RootDirectory = "Content"; Window.Title = "Defend Uranus"; GameContent.Initialize(Content); SoundManager.SEFolder = "Sounds"; SoundManager.BGMFolder = "BGM"; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); GameContent.Initialize(Content); _title = new TitleScreen("Images/arena", Width, Height); _hostingScreen = new MessageScreen("Images/arena", Width, Height, "Searching for Players..."); _searchingScreen = new MessageScreen("Images/arena", Width, Height, "Searching for Games..."); //Reset(); _titleSong = GameContent.LoadContent <Song>("Music/Title"); _gameSong = GameContent.LoadContent <Song>("Music/Arena"); MediaPlayer.Play(_titleSong); MediaPlayer.IsRepeating = true; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { GameContent.Initialize(Content); // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); _introScreen = new IntroScreen(this); _mainMenu = new TitleScreen(this); _credits = new CreditsScreen(this); _gameOver = new GameOverScreen(this); _options = new OptionsScreen(this); _loadscreen = new LoadScreen(this); _savescreen = new SaveScreen(this); _loadingScreen = new LoadingScreen(this); _howToPlay = new HowToPlay(this); GameStateManager.Parent = this; //System.Threading.ThreadPool.QueueUserWorkItem(LoadContentAsync); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { GameContent.Initialize(Content); base.Initialize(); }