/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create our viewports gameViewport = GraphicsDevice.Viewport; worldViewport = new Viewport(0, 0, 768, 720); // Twice as wide as 16 tiles guiViewport = new Viewport(768, 0, 512, 720); // Remaining space // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); GameObjectManager = new GameObjectManager(Content); // TODO: use this.Content to load your game content here Player = GameObjectManager.CreatePlayerShip(PlayerShipType.Shrike, new Vector2(300, 300)); GameObjectManager.CreatePowerup(PowerupType.Fireball, new Vector2(100, 200)); //Player.ApplyPowerup(PowerupType.Fireball); LevelManager.LoadContent(); LevelManager.LoadLevel("crystalland"); GuiManager.LoadContent(); GameState = GameState.Initializing; }
/// <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); GameObjectManager = new GameObjectManager(Content); // TODO: use this.Content to load your game content here player = GameObjectManager.CreatePlayerShip(PlayerShipType.Shrike, new Vector2(300, 300)); player.ApplyPowerup(PowerupType.Fireball); // Create a Green Goblin enemy GameObjectManager.CreateEnemy(EnemyType.GreenGoblin, new Vector2(200, -150)); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create our viewports gameViewport = GraphicsDevice.Viewport; worldViewport = new Viewport(0, 0, 768, 720); // Twice as wide as 16 tiles guiViewport = new Viewport(768, 0, 512, 720); // Remaining space // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // Create a basic effect, used with the spritebatch basicEffect = new BasicEffect(GraphicsDevice) { TextureEnabled = true, VertexColorEnabled = true, }; GameObjectManager = new GameObjectManager(Content); // TODO: use this.Content to load your game content here Player = GameObjectManager.CreatePlayerShip(PlayerShipType.Shrike, new Vector2(300, 300)); //Player.ApplyPowerup(PowerupType.Fireball); LevelManager.LoadContent(); LevelManager.LoadLevel("lavaLevel2"); //test out new panzer personality int p1 = 100; int p2 = 200; for (int i = 0; i < 6; i++) { GameObjectManager.CreateEnemy(EnemyType.Panzer, new Vector2(p1, 100)); GameObjectManager.CreateEnemy(EnemyType.Panzer2, new Vector2(p2, 100)); p1 += 100; p2 += 100; } //test out lavabug GameObjectManager.CreateEnemy(EnemyType.Lavabug, new Vector2(100, 75)); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create our viewports gameViewport = GraphicsDevice.Viewport; worldViewport = new Viewport(0, 0, 768, 720); // Twice as wide as 16 tiles guiViewport = new Viewport(768, 0, 512, 720); // Remaining space // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); GameObjectManager = new GameObjectManager(Content); // TODO: use this.Content to load your game content here MediaPlayer.IsRepeating = true; Player = GameObjectManager.CreatePlayerShip(PlayerShipType.Shrike, new Vector2(300, 300)); Player.ApplyPowerup(PowerupType.Default); LevelManager.LoadContent(); GuiManager.LoadContent(); SplashType = SplashScreenType.GameStart; GameState = GameState.Splash; loadSplashScreen(new GameStart()); }
/// <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); GameObjectManager = new GameObjectManager(Content); // TODO: use this.Content to load your game content here player = GameObjectManager.CreatePlayerShip(PlayerShipType.Shrike, new Vector2(300, 300)); GameObjectManager.CreatePowerup(PowerupType.Fireball, new Vector2(100, 200)); //player.ApplyPowerup(PowerupType.Fireball); tilemap = Content.Load<Tilemap>("Tilemaps/example"); for (int i = 0; i < tilemap.GameObjectGroupCount; i++) { for (int j = 0; j < tilemap.GameObjectGroups[i].GameObjectData.Count(); j++ ) { GameObjectData goData = tilemap.GameObjectGroups[i].GameObjectData[j]; Vector2 position = new Vector2(goData.Position.Center.X, goData.Position.Center.Y); GameObject go; switch (goData.Category) { case "Powerup": go = GameObjectManager.CreatePowerup((PowerupType)Enum.Parse(typeof(PowerupType), goData.Type), position); goData.ID = go.ID; break; case "Enemy": go = GameObjectManager.CreateEnemy((EnemyType)Enum.Parse(typeof(EnemyType), goData.Type), position); goData.ID = go.ID; break; } } } tilemap.Scrolling = true; GameObjectManager.CreateEnemy(EnemyType.Cobalt, new Vector2(200, 200)); }