Exemple #1
0
    private void Awake()
    {
        _animator  = GetComponent <Animator>();
        _rigidBody = GetComponent <Rigidbody2D>();
        _hitSound  = GetComponent <AudioSource>();
        DiamondsCountChanged?.Invoke(Diamonds);

        _hammers.Add(_hammer);
        HammerChanged?.Invoke(_hammer);
    }
Exemple #2
0
 public void CollectDiamond(int diamondsCount)
 {
     Diamonds += diamondsCount;
     DiamondsCountChanged?.Invoke(Diamonds);
 }
Exemple #3
0
 public void BuyingHammer(Hammer hammer)
 {
     _hammers.Add(hammer);
     Diamonds -= hammer.Price;
     DiamondsCountChanged?.Invoke(Diamonds);
 }