Ejemplo n.º 1
0
        public static void LoadContent(ContentManager content)
        {
            FontProvider.AddFont("Mono14", content.Load <SpriteFont>(@"fonts/mono14"));
            FontProvider.AddFont("Mono8", content.Load <SpriteFont>(@"fonts/mono8"));
            FontProvider.AddFont("Mono21", content.Load <SpriteFont>(@"fonts/mono21"));

            Titlescreen.TitleTexture = content.Load <Texture2D>(@"textures/titlescreen");

            new TileMap <Map <TileCode>, TileCode>(8, 8, 0, FontProvider.GetFont("Mono8"),
                                                   content.Load <Texture2D>(@"textures/spritesheets/tilesheet"), 3);

            BulletInformationProvider.LoadBulletData(content);
            AnimationDictionaryProvider.Content = content;
        }
Ejemplo n.º 2
0
        private void LoadContent()
        {
            var content = Editor.Content;

            _spriteBatch = Editor.spriteBatch;
            VariableProvider.SpriteBatch = _spriteBatch;
            TileMap = new TileMap <Map <TileCode>, TileCode>(8, 8, 0, content.Load <SpriteFont>(@"fonts/mono8"),
                                                             content.Load <Texture2D>(@"textures/spritesheets/tilesheet"),
                                                             Layers);
            AnimationDictionaryProvider.Content = content;
            _player          = Factory.CreatePlayer();
            _player.Position = new Vector2(float.MaxValue, float.MaxValue);
            VariableProvider.CurrentPlayer = _player;
            EntityManager.SetPlayer();
            _renderTarget = new RenderTarget2D(GraphicsDevice, 320, 240, false,
                                               GraphicsDevice.DisplayMode.Format, DepthFormat.Depth24);
            GameInitializer.Initialize();
            _coordList            = VariableProvider.CoordList;
            EngineState.GameState = EngineStates.Editor;
            BulletInformationProvider.LoadBulletData(content);
            FontProvider.AddFont("Mono8", content.Load <SpriteFont>("fonts/mono8"));
        }