private IEnumerator StartTap() { yield return(new WaitForSeconds(Delay)); var touching = BaseInput.IsTouching(); if (touching) { Tapping = true; OnTapEvent.Invoke(BaseInput.GetTouchPosition()); } }
public override void OnTap() { if (!IsBought) { if (_coins.GetCoins() >= _furniture.Price) { _coins.DepriveCoins(_furniture.Price); _coins.AddHearts(_furniture.Reward); _coins.AddPricePerVisit(_furniture.Reward); IsBought = true; PlayerPrefs.SetInt(_furniture.SaveKey + _furniture.Stage, 1); SetPrice(); SetFurniture(); } } else { SetFurniture(); } OnTapEvent?.Invoke(); }