private void OnBuyTried(PlayerPropertiesInt properties) { if (_player.TryPickMoney(properties.NextPrice)) { _playerEnhancer.SetValue(properties); } }
public void SetValue(PlayerPropertiesInt properties) { if (properties == _health) { _player.IncreaseHealth(); } else { _playerAttacker.IncreaseDemage(); } properties.SetNextValue(); ValueSetted?.Invoke(_health, _demage); }
private void OnValueSetted(PlayerPropertiesInt health, PlayerPropertiesInt demage) { _healthBuyView.Init(health); _demageBuyView.Init(demage); }
public void Init(PlayerPropertiesInt playerProperties) { _price.text = playerProperties.NextPrice.ToString(); _label.text = playerProperties.Name; _playerProperties = playerProperties; }