Пример #1
0
        public Dungeon(Game game, IDungonBuilder builder) : base(game)
        {
            InitializeGraphics();
            Game.Components.Add(this);
            Builder = builder;


            ActiveLevels = new LevelCollection();
            var l = LoadLevel(0, null);//2, new Point(11, 14));

            Theron = new Theron(l.StartTile, Game);
            Game.Components.Add(Theron);
            Theron.LocationChanged += CurrentPlayer_LocationChanged;
            EnabledChanged         += Dungeon_EnabledChanged;
        }
Пример #2
0
        public DungeonBase(IDungonBuilder <TFactories> builder, TFactories factoreis, TLeader leader, GraphicsDevice graphicsDevice)
        {
            GraphicsDevice = graphicsDevice;
            InitializeGraphicDefaults();
            Builder   = builder;
            Factories = factoreis;

            ActiveLevels = new LevelCollection();
            DungeonLevel level;

            //level = LoadLevel(2, new Point(9, 27));
            //level = LoadLevel(2, new Point(12, 34));
            //level = LoadLevel(1, new Point(20, 30));
            //level = LoadLevel(0, new Point(4, 15));
            //level = LoadLevel(3, new Point(6, 8));
            //level = LoadLevel(1, new Point(4, 14));
            //level = LoadLevel(1, new Point(7,21));
            //level = LoadLevel(0, new Point(9, 7));
            level = LoadLevel(0, null);// start
            //level = LoadLevel(4, new Point(7, 25));
            Leader          = leader;
            Leader.Location = Leader.Layout.GetSpaceElement(Leader.Layout.AllSpaces.First(), level.StartTile);
        }