private void Start() { destroyPrice = Random.Range(destroyPriceRange.x, destroyPriceRange.y); FillingUpdated?.Invoke(LeftToFill); SetColor(colors[Random.Range(0, colors.Length)]); }
public void Fill() { _filling++; FillingUpdated?.Invoke(LeftToFill); if (_filling == _destroyPrice) { Destroy(gameObject); } }
private void Start() { _destroyPrice = Random.Range(_destroyPriceRange.x, _destroyPriceRange.y); FillingUpdated?.Invoke(LeftToFill); }