Пример #1
0
 public void Spoil()
 {
     if (_spoil)
     {
         _metalsCount      += _countSpoil;
         _spoil             = false;
         _iconSpoil.enabled = false;
         MetalsChanged?.Invoke(_metalsCount);
     }
 }
Пример #2
0
    public bool GiveMetals(int countGivenMetal)
    {
        if (countGivenMetal <= _metalsCount)
        {
            _metalsCount -= countGivenMetal;
            MetalsChanged?.Invoke(_metalsCount);

            return(true);
        }
        else
        {
            return(false);
        }
    }
Пример #3
0
 private void Start()
 {
     MetalsChanged?.Invoke(_metalsCount);
 }