private void Awake() { _animator = GetComponent <Animator>(); _rigidBody = GetComponent <Rigidbody2D>(); _hitSound = GetComponent <AudioSource>(); DiamondsCountChanged?.Invoke(Diamonds); _hammers.Add(_hammer); HammerChanged?.Invoke(_hammer); }
public void CollectDiamond(int diamondsCount) { Diamonds += diamondsCount; DiamondsCountChanged?.Invoke(Diamonds); }
public void BuyingHammer(Hammer hammer) { _hammers.Add(hammer); Diamonds -= hammer.Price; DiamondsCountChanged?.Invoke(Diamonds); }