Example #1
0
        protected override void Initialize()
        {
            spriteManager = new SpriteManager(this);
            audioManager = new AudioManager();
            GameVariable.audioManager = audioManager;
            IsMouseVisible = true;
            Viewport vp = GraphicsDevice.Viewport;
            vp.Bounds = new Rectangle(32, 16, 384, 448);
            camera = new Camera(this, new Vector3(0, -2.5f, 4), Vector3.Zero, Vector3.Up, vp);
            bg = new Background(this, camera);
            Components.Add(camera);
            Components.Add(bg);
            Components.Add(spriteManager);

            base.Initialize();
        }
Example #2
0
 public Background(Game game,Camera camera)
     : base(game)
 {
     this.camera = camera;
 }