Example #1
0
        private void Button1Click(object sender, EventArgs e)
        {
            World = new VGWorld(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text), Convert.ToInt32(textBox3.Text));
            World.WorldArea.SetBorder(1);

            richTextBox1.Text = World.WorldArea.ToString();
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            World = new VGWorld(199, 119, 0);
            World.WorldArea.SetBorder(1);

            richTextBox1.Text = World.WorldArea.ToString();
        }
Example #3
0
        public VGArea(VGWorld mWorld, int mXStart, int mYStart, int mXEnd, int mYEnd)
        {
            Debug.Assert(XStart >= 0 && XStart <= XEnd && XEnd < mWorld.Width);
            Debug.Assert(YStart >= 0 && YStart <= YEnd && YEnd < mWorld.Height);

            World = mWorld;
            XStart = mXStart;
            YStart = mYStart;
            XEnd = mXEnd;
            YEnd = mYEnd;
            Tiles = new VGTile[Width,Height];

            for (int iY = 0; iY < Height; iY++)
                for (int iX = 0; iX < Width; iX++)
                    Tiles[iX, iY] = World.Tiles[iX + XStart, iY + YStart];
        }
Example #4
0
        public VGArea(VGWorld mWorld, int mXStart, int mYStart, int mXEnd, int mYEnd)
        {
            Debug.Assert(XStart >= 0 && XStart <= XEnd && XEnd < mWorld.Width);
            Debug.Assert(YStart >= 0 && YStart <= YEnd && YEnd < mWorld.Height);

            World  = mWorld;
            XStart = mXStart;
            YStart = mYStart;
            XEnd   = mXEnd;
            YEnd   = mYEnd;
            Tiles  = new VGTile[Width, Height];

            for (int iY = 0; iY < Height; iY++)
            {
                for (int iX = 0; iX < Width; iX++)
                {
                    Tiles[iX, iY] = World.Tiles[iX + XStart, iY + YStart];
                }
            }
        }