private void Button3Click(object sender, EventArgs e) { VGArea currentArea = new VGArea(World, Convert.ToInt32(textBox21.Text), Convert.ToInt32(textBox22.Text), Convert.ToInt32(textBox23.Text), Convert.ToInt32(textBox24.Text)); VGGBSPDungeon bsp = new VGGBSPDungeon(4, 3, 1, Convert.ToInt32(textBox8.Text), Convert.ToInt32(textBox11.Text), Convert.ToInt32(textBox9.Text), checkBox1.Checked, checkBox4.Checked, Convert.ToInt32(textBox19.Text), Convert.ToInt32(textBox20.Text), checkBox5.Checked); bsp.Generate(currentArea); richTextBox1.Text = World.WorldArea.ToString(); }
public VGWorld(int mWidth, int mHeight, int mValue) { Debug.Assert(mWidth > 0); Debug.Assert(mHeight > 0); Width = mWidth; Height = mHeight; Tiles = new VGTile[Width,Height]; for (int iY = 0; iY < Height; iY++) for (int iX = 0; iX < Width; iX++) Tiles[iX, iY] = new VGTile(iX, iY, mValue); WorldArea = new VGArea(this, 0, 0, mWidth, mHeight); }
private void Button4Click(object sender, EventArgs e) { VGArea currentArea = new VGArea(World, Convert.ToInt32(textBox21.Text), Convert.ToInt32(textBox22.Text), Convert.ToInt32(textBox23.Text), Convert.ToInt32(textBox24.Text)); VGGWalker walker = new VGGWalker(0, 1, Convert.ToInt32(textBox10.Text), Convert.ToInt32(textBox14.Text), Convert.ToInt32(textBox13.Text), Convert.ToInt32(textBox12.Text), Convert.ToInt32(textBox15.Text), checkBox2.Checked, checkBox3.Checked, Convert.ToInt32(textBox16.Text), Convert.ToInt32(textBox17.Text), Convert.ToInt32(textBox18.Text)); walker.Generate(currentArea); richTextBox1.Text = World.WorldArea.ToString(); }
public VGArea Clone() { VGArea result = new VGArea(World, XStart, YStart, XEnd, YEnd); for (int iY = 0; iY < Height; iY++) { for (int iX = 0; iX < Width; iX++) { result.Tiles[iX, iY] = Tiles[iX, iY].Clone(); } } return(result); }
private void Button2Click(object sender, EventArgs e) { VGArea currentArea = new VGArea(World, Convert.ToInt32(textBox21.Text), Convert.ToInt32(textBox22.Text), Convert.ToInt32(textBox23.Text), Convert.ToInt32(textBox24.Text)); int coverage = Convert.ToInt32(textBox7.Text); int fc = Convert.ToInt32(textBox4.Text); int wc = Convert.ToInt32(textBox5.Text); int iterations = Convert.ToInt32(textBox6.Text); VGGCave cave = new VGGCave(0, 1, coverage, fc, wc, iterations); cave.Generate(currentArea); richTextBox1.Text = World.WorldArea.ToString(); }
public VGWorld(int mWidth, int mHeight, int mValue) { Debug.Assert(mWidth > 0); Debug.Assert(mHeight > 0); Width = mWidth; Height = mHeight; Tiles = new VGTile[Width, Height]; for (int iY = 0; iY < Height; iY++) { for (int iX = 0; iX < Width; iX++) { Tiles[iX, iY] = new VGTile(iX, iY, mValue); } } WorldArea = new VGArea(this, 0, 0, mWidth, mHeight); }
public VGArea Clone() { VGArea result = new VGArea(World, XStart, YStart, XEnd, YEnd); for (int iY = 0; iY < Height; iY++) for (int iX = 0; iX < Width; iX++) result.Tiles[iX, iY] = Tiles[iX, iY].Clone(); return result; }
private void Button5Click(object sender, EventArgs e) { VGArea currentArea = new VGArea(World, Convert.ToInt32(textBox21.Text), Convert.ToInt32(textBox22.Text), Convert.ToInt32(textBox23.Text), Convert.ToInt32(textBox24.Text)); VGGOutliner outliner = new VGGOutliner(); outliner.Generate(currentArea); richTextBox1.Text = World.WorldArea.ToString(); }
private void Button6Click(object sender, EventArgs e) { VGArea currentArea = new VGArea(World, Convert.ToInt32(textBox21.Text), Convert.ToInt32(textBox22.Text), Convert.ToInt32(textBox23.Text), Convert.ToInt32(textBox24.Text)); VGGCave cave = new VGGCave(mIterations: 3, mInitialSolidPercent: 75); VGGBSPDungeon bsp = new VGGBSPDungeon(mSplits: 9, mCarveOffset: 1); VGGOutliner outliner = new VGGOutliner(); cave.Generate(currentArea); bsp.Generate(currentArea); outliner.Generate(currentArea); richTextBox1.Text = World.WorldArea.ToString(); }