コード例 #1
0
        public MazeEditor()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //needed ?
            g_data.offsetx = 100;
            g_data.offsety = 80;
            g_data.gridthicknessH = 1;
            g_data.gridthicknessV = 1;
            g_data.tilesizeH = 10;
            g_data.tilesizeV = 10;

            layoutWidth = layoutHeight = 10;
            currentLayoutIndex = 0;

            savetext = string.Empty;
            st_delay = 0f;
            currentColor = 1;

            mazeLayout = new Layout(layoutWidth, layoutHeight);

            //CellsToDraw = new List<GridCell>();
        }
コード例 #2
0
        protected override void Initialize()
        {
            graphics.PreferredBackBufferWidth = 1024;
            graphics.PreferredBackBufferHeight = 768;
            graphics.ApplyChanges();

            this.Window.AllowUserResizing = true;

            IsMouseVisible = true;

            methodArray = (PickMethod[])Enum.GetValues(typeof(PickMethod));

            picking = PickMethod.Newest;
            mazeW = 20;
            mazeH = 18;
            backgroundsW = 500;
            backgroundsH = 400;
            holesCount = 0;
            holesMaxRadius = 0;

            layoutIndex = 0;

            mlayout = new Layout(mazeW, mazeH);

            aMazIng = new Maze(mazeW, mazeH, mlayout, 0, 0, PickMethod.Cyclic);
            aMazIng.GenerateTWMaze_GrowingTree(picking);

            //aMazIng.dumpMaze();

            base.Initialize();
        }