private void Update() { float angle = CalculatePourAngle(_direction); bool pourCheck = angle < _pourThreshold; if (angle < -_pourThreshold && _allowPourOut) { SendMessage("ClearLiquids"); _currentStream.SetColor(new Color()); } if (_isPouring != pourCheck) { _isPouring = pourCheck; if (_isPouring) { StartPour(); } else { EndPour(); } } }
private void StartPour() { _currentStream = CreateStream(); _currentStream.SetColor(_color); _currentStream.SetStreamScale(_streamScale); _currentStream.IgnoreCollider(_objectCollider); _currentStream.Begin(); }