예제 #1
0
        private void MoveMapLevelDown()
        {
            rootConsole.ClearMap();
            MapGenerator mapGenerator = new MapGenerator(this, mapWidth, mapHeight, 20, 13, 7, ++mapLevel);

            World = mapGenerator.CreateMap();
            rootConsole.GenerateMap(World);
            rootConsole.SetPlayer(Player);
            World.UpdatePlayerFieldOfView(Player);
            Draw();
            MessageLog    = new MessageLog(this);
            commandSystem = new CommandSystem(this);
        }
예제 #2
0
        public Game(UI_Main console)
        {
            int seed = (int)DateTime.UtcNow.Ticks;

            Random           = new DotNetRandom(seed);
            commandSystem    = new CommandSystem(this);
            MessageLog       = new MessageLog(this);
            SchedulingSystem = new SchedulingSystem();

            rootConsole             = console;
            rootConsole.UpdateView += OnUpdate;                          // Set up a handler for graphic engine Update event

            MessageLog.Add("The rogue arrives on level " + mapLevel);
            MessageLog.Add("Level created with seed '" + seed + "'");

            GenerateMap();
            rootConsole.SetPlayer(Player);
            World.UpdatePlayerFieldOfView(Player);
            Draw();
        }