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