Exemple #1
0
    public void Harvest()
    {
        var bonus = _teaLeaves.Count == _spawnPoints.Count ? Bonus : 0;
        var teaLeavesHarvested = _teaLeaves.Count * TeaLeafValue + bonus;

        _gameController.TeaLeavesHarvested(teaLeavesHarvested);
        _currencyManager.Deposit(teaLeavesHarvested);
        foreach (var teaLeaf in _teaLeaves)
        {
            Destroy(teaLeaf.Value);
        }
        _teaLeaves.Clear();
    }