Ejemplo n.º 1
0
    public void OnClick()
    {
        if (_isGoldCap)
        {
            if (_isCollect == false)
            {
                _textPool[_index].StartMotion(_caps.GetCapsPerTaps() * 200);
                _isCollect = true;
            }
        }
        else
        {
            _textPool[_index].StartMotion(_caps.GetCapsPerTaps());
        }

        _index = _index == _textPool.Length - 1 ? 0 : _index + 1;
    }
Ejemplo n.º 2
0
 public void GetReward()
 {
     if (!_isCollected)
     {
         _soundEvents.PlayAudioClip(_soundEvents._tapSounds[2], _soundEvents._audioSourceEvents);
         _isCollected = true;
         _animation.Play();
         _caps.AddCap(_caps.GetCapsPerTaps() * 200);
         SaveCount();
         Destroy(gameObject, 1f);
     }
 }