Ejemplo n.º 1
0
 protected override void UnloadContent()
 {
     camera = null;
     spaceship = null;
     skybox = null;
 }
Ejemplo n.º 2
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     device = graphics.GraphicsDevice;
     Mouse.SetPosition(device.Viewport.Width / 2, device.Viewport.Height / 2);
     originalMouseState = Mouse.GetState();
     billboardEffect = this.Content.Load<Effect>("Shaders/billboard_effect");
     camera = new Camera(device);
     lifeTexture = this.Content.Load<Texture2D>("Sprites/spaceship_sprite");
     explosionParticleTexture = this.Content.Load<Texture2D>("Sprites/explosion_particle");
     shieldSprite = this.Content.Load<Texture2D>("Sprites/power_up_shield");
     shrinkSprite = this.Content.Load<Texture2D>("Sprites/power_up_shrink");
     timeFont = Content.Load<SpriteFont>("Fonts/Courier New");
     collisionEngine = new CollisionEngine();
     particleEngine = new ParticleEngine(explosionParticleTexture, billboardEffect, device);
     soundEngine = new SoundEngine(this.Content);
     skybox = new Skybox();
     skybox.LoadModel(this.Content, effect);
     spaceship = new Spaceship();
     spaceship.LoadModelAndTexture(this.Content, effect);
     torpedoes = new List<Torpedo>();
     powerups = new List<Powerup>();
     LoadAsteroids();
 }