public void Spoil() { if (_spoil) { _metalsCount += _countSpoil; _spoil = false; _iconSpoil.enabled = false; MetalsChanged?.Invoke(_metalsCount); } }
public bool GiveMetals(int countGivenMetal) { if (countGivenMetal <= _metalsCount) { _metalsCount -= countGivenMetal; MetalsChanged?.Invoke(_metalsCount); return(true); } else { return(false); } }
private void Start() { MetalsChanged?.Invoke(_metalsCount); }