예제 #1
0
        private IEnumerator Chop()
        {
            _isChopping = true;
            while (_currentProcessTime < _finalProcessTime)
            {
                slider.value         = _currentProcessTime / _finalProcessTime;
                _currentProcessTime += Time.deltaTime;
                yield return(null);
            }

            // finished
            _ingredient.ChangeToProcessed();
            slider.gameObject.SetActive(false);
            _isChopping    = false;
            _chopCoroutine = null;
            OnChoppingStop?.Invoke(LastPlayerControllerInteracting);
        }