public void ChangeItemCount() { var berryPercent = (int)gameObject.GetComponent <Slider>().value; Map.CountTypeObjects[(int)Cell.TypeOfCell.Poison] = (int)(Map.AllCellCount * berryPercent / 100.0f); Map.CleanMap((int)Cell.TypeOfCell.Poison); }
public void ChangeItemCount() { var mineralPercent = (int)gameObject.GetComponent <Slider>().value; Map.CountTypeObjects[(int)Cell.TypeOfCell.Mineral] = (int)(Map.AllCellCount * mineralPercent / 100.0f); Map.CleanMap((int)Cell.TypeOfCell.Mineral); }