Example #1
0
        protected override void Initialize()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            player = new Player(graphics, Content);
            player.initialize();

            inputManager = new InputManager(this);
            Components.Add(inputManager);

            mapManager = new MapManager(this, graphics, Content, player);
            mapManager.initialize();

            spriteFont = Content.Load <SpriteFont>("TextFont");
            HudManager = new HUDManager(spriteBatch, GraphicsDevice, Content, player, spriteFont, mapManager);
            HudManager.initialize();

            soundEffects = new List <SoundEffect>();
            random       = new Random();

            SoundEffect.MasterVolume = 0.1f;
            cont = 0;

            base.Initialize();
        }
Example #2
0
        protected override void Initialize()
        {
            player = new Player(graphics, Content);
            player.initialize();

            inputManager = new InputManager(this);
            Components.Add(inputManager);

            mapManager = new MapManager(graphics, Content, player);
            mapManager.initialize();

            soundEffects = new List <SoundEffect>();
            random       = new Random();

            base.Initialize();
        }