Пример #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            ResourceProvider.Instance.Initialize(GraphicsDevice, Content);

            var dungeonParser = new DungeonParser();

            dungeonParser.Parse();

            var renderers = new DefaulRenderers(Content, GraphicsDevice);
            var factoreis = new LegacyFactories(dungeonParser.Data, renderers);
            var theron    = new LegacyLeader(factoreis);

            var initializer = new LegacyMapBuilderInitializer();
            var builder     = new LegacyMapBuilder(initializer);

            initializer.Data        = dungeonParser.Data;
            initializer.ItemCreator = new LegacyItemCreator(builder);

            var wallActuatorCreator  = new WallActuatorCreator(builder);
            var floorActuatorCreator = new FloorActuatorCreator(builder);
            var sidesCreator         = new SidesCreator(builder, wallActuatorCreator, floorActuatorCreator);
            var logicActuatorCreator = new LogicActuatorCreator(builder);
            var creatureCreator      = new CreatureCreator(builder);

            initializer.TileCreator = new LegacyTileCreator(builder, sidesCreator, logicActuatorCreator, creatureCreator);
            initializer.Initialize();

            dungeon = new Dungeon(builder, factoreis, theron, GraphicsDevice);

            GameConsole.InitializeConsole(this, dungeon);
            GameConsole.Instance.DrawOrder = 1;
        }
Пример #2
0
 private void Awake()
 {
     creatureCreator = CreatureCreator.Instance;
 }