Exemplo n.º 1
0
    private IEnumerator ChangeColorTimer(Ingredient ingredient)
    {
        yield return(new WaitForSeconds(0.15f));

        if (!_inDipCooldown)
        {
            _dipParticles.startColor = _dipColor;
            _dipParticles.Emit(15);
        }
        _inDipCooldown = true;

        ingredient.ChangeColor(_dipColor);
        if (OnColorStationUsed != null)
        {
            OnColorStationUsed();
        }

        yield return(new WaitForSeconds(0.3f));

        _inDipCooldown = false;
    }