/// <summary> /// Deklarerer komponentene /// </summary> protected override void Initialize() { camera = new Camera(this); this.Components.Add(camera); skybox = new Skybox(this, this.Content, camera); this.Components.Add(skybox); terrain = new Terrain(this, this.Content, camera); this.Components.Add(terrain); blimps = new Blimps(this, this.Content, camera, terrain); this.Components.Add(blimps); game = new Plane(this, this.Content, camera); this.Components.Add(game); explo = new ParticleComponent(this, this.Content, camera); this.Components.Add(explo); sprites = new _2Dsprites(this, this.Content, camera); this.Components.Add(sprites); spriteBatch = new SpriteBatch(graphics.GraphicsDevice); base.Initialize(); }
/// <summary> /// Kontruktør /// </summary> /// <param name="game">Spillet</param> /// <param name="Content">Content manager</param> /// <param name="camera">Kameraet</param> /// <param name="terrain">Terrenget</param> public Blimps(Game game, ContentManager Content, Camera camera, Terrain terrain) : base(game) { graphics = (GraphicsDeviceManager)Game.Services.GetService (typeof(IGraphicsDeviceManager)); this.camera = camera; this.Content = Content; this.terrain = terrain; }