Esempio n. 1
0
 public Vegetation(Map map, Point StartPosition)
 {
     _map      = map;
     _position = StartPosition;
     _texture  = VegetationTexture.Tree;
     _size     = new Size(400, 400);
 }
Esempio n. 2
0
        public void CreateVegetation(VegetationTexture texture)
        {
            Vegetation v;

            switch (texture)
            {
            case VegetationTexture.Tree:
                v = new Tree(this._map, _vegetationSelectorCursor);
                break;

            case VegetationTexture.Bush:
                v = new Bush(this._map, _vegetationSelectorCursor);
                break;

            case VegetationTexture.Rock:
                v = new Rock(this._map, _vegetationSelectorCursor);
                break;

            default:
                throw new NotSupportedException("Unknown vegetation type");
            }
            _map.Vegetation.Add(v);
        }
Esempio n. 3
0
 private void bushToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _selectedVegetation = VegetationTexture.Bush;
 }
Esempio n. 4
0
 private void rockToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _selectedVegetation = VegetationTexture.Rock;
 }
Esempio n. 5
0
 private void treeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _selectedVegetation = VegetationTexture.Tree;
 }