private void ChangePrice(Storage price, float HowMuch) { float newValue = HowMuch + price.get(); if (newValue <= 0f) { newValue = (float)Options.minPrice.Get(); } if (newValue >= (float)Options.maxPrice.Get()) { newValue = (float)Options.maxPrice.Get(); //if (getBouth(price.Product) != 0) newValue = Game.maxPrice / 20f; } price.Set(newValue); priceHistory.addData(price.Product, price); }
private void ChangePrice(Storage price, float HowMuch) { float newValue = HowMuch + price.get(); if (newValue <= 0) { newValue = Game.minPrice; } if (newValue >= Game.maxPrice) { newValue = Game.maxPrice; //if (getBouth(price.getProduct()) != 0) newValue = Game.maxPrice / 20f; } price.set(newValue); priceHistory.addData(price.getProduct(), price); }