Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            loadSpriteFactories();
            SoundManager.Instance.LoadAllSounds(Content);
            allObjectsManager = new TheGameObjectManager();
            GameUtilities.GameObjectManager = allObjectsManager;
            spriteBatch        = new SpriteBatch(GraphicsDevice);
            GameUtilities.Game = this;
            int       width  = GraphicsDevice.Viewport.Bounds.Width;
            int       height = GraphicsDevice.Viewport.Bounds.Height;
            LoadLevel loader = new LoadLevel(width, height, allObjectsManager);

            InitializeControllers();
            loader.loadTheLevel();

            camera = new Camera2D();
            Camera2D.LimitationList.Add(GameUtilities.LevelEndLine * GameUtilities.BlockSize);
            Camera2D.LimitationList.Add(GameUtilities.UndergroundEndLine * GameUtilities.BlockSize);
            Camera2D.LimitationList.Add(GameUtilities.Competitive1EndLine * GameUtilities.BlockSize);
            Camera2D.LimitationList.Add(GameUtilities.Competitive2EndLine * GameUtilities.BlockSize);
        }