public void SelectMine(string type) { Mine m = Mine.IronMine; if (type == "ironmine") { m = Mine.IronMine; } if (type == "jellymine") { m = Mine.JellyMine; } if (type == "coalmine") { m = Mine.CoalMine; } gridCreator.SelectMine(m); Destroy(gameObject); }