Beispiel #1
0
        //private SoundManager sound;

        public SimpleGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.PreferredBackBufferWidth  = width;
            graphics.PreferredBackBufferHeight = height;

            input = new InputHandler(this);
            Components.Add(input);

            background         = new Background(this, @"Textures\");
            background.Enabled = background.Visible = false;
            Components.Add(background);

            cam = new CelAnimationManager(this, @"Textures\");
            Components.Add(cam);

            player          = new Player(this);
            player.Position = playerPosition;
            Components.Add(player);

            enemies = new EnemyManager(this);
            Components.Add(enemies);

            fade = new FadeOut(this);
            Components.Add(fade);

            explosionManager = new ExplosionManager(this);
            Components.Add(explosionManager);

            //sound = new SoundManager(this, "Chapter7");
            //Components.Add(sound);
        }
Beispiel #2
0
        public SimpleGame()
        {
            graphics = new GraphicsDeviceManager(this);
//#if !ZUNE
            Content.RootDirectory = "Content";
//#else
//            Content.RootDirectory = "ZuneContent";
//#endif

            graphics.PreferredBackBufferWidth  = width;
            graphics.PreferredBackBufferHeight = height;

            graphics.ApplyChanges();

#if ZUNE
            zuneRenderTarget = new RenderTarget2D(
                GraphicsDevice,
                width,
                height,
                0,
                SurfaceFormat.Color);
#endif

            input = new InputHandler(this);
            Components.Add(input);

            background         = new Background(this, @"Textures\");
            background.Enabled = background.Visible = false;
            Components.Add(background);

            cam = new CelAnimationManager(this, @"Textures\");
            Components.Add(cam);

            player          = new Player(this);
            player.Position = playerPosition;
            Components.Add(player);

            enemies = new EnemyManager(this);
            Components.Add(enemies);

            explosionManager = new ExplosionManager(this);
            Components.Add(explosionManager);

            fade = new FadeOut(this);
            Components.Add(fade);

            fps = new FPS(this);
            Components.Add(fps);

            sound = new SoundManager();

            //backgroundThread = new Thread(BackgroundMusicThread);
        }