public Vegetation(Map map, Point StartPosition) { _map = map; _position = StartPosition; _texture = VegetationTexture.Tree; _size = new Size(400, 400); }
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); }
private void bushToolStripMenuItem_Click(object sender, EventArgs e) { _selectedVegetation = VegetationTexture.Bush; }
private void rockToolStripMenuItem_Click(object sender, EventArgs e) { _selectedVegetation = VegetationTexture.Rock; }
private void treeToolStripMenuItem_Click(object sender, EventArgs e) { _selectedVegetation = VegetationTexture.Tree; }