This commit is contained in:
Nam Tae Gun 2024-11-19 10:12:01 +09:00
parent 9ef51bd5e4
commit 4c46b87a95
7 changed files with 23 additions and 19 deletions

View File

@ -10564,7 +10564,6 @@ MonoBehaviour:
_liquidObject: {fileID: -7612237390858616641, guid: 231c2f369e2946745a955eb49243702b, type: 3}
_garnishObject: {fileID: 5803694563079548352, guid: f051d09e1e3043d4285ae8e0ff4c4f12, type: 3}
_liquidsPerSecond: 100
_maxLiquidCount: 300
_colorLerpSpeed: 0.5
_colorIntensity: 2
_reachedLerpPosition: {x: -10.5, y: 4}

View File

@ -131,10 +131,13 @@ namespace BlueWater.Audios
if (ignoreTimeScale)
{
availableSfxAudioSource.pitch = duration.HasValue ? value.length / duration.Value : 1f;
// TimeScale의 영향을 받지 않는 pitch 설정
_sfxPitchDictionary[availableSfxAudioSource] = duration.HasValue ? value.length / duration.Value : 1f;
availableSfxAudioSource.pitch = _sfxPitchDictionary[availableSfxAudioSource];
}
else
{
// TimeScale의 영향을 받는 pitch 설정
_sfxPitchDictionary[availableSfxAudioSource] = duration.HasValue ? value.length / duration.Value : 1f;
availableSfxAudioSource.pitch = _sfxPitchDictionary[availableSfxAudioSource] * Time.timeScale;
}

View File

@ -8,6 +8,9 @@ namespace BlueWater.Items
[CreateAssetMenu(fileName = "CocktailDataTable", menuName = "ScriptableObjects/CocktailDataTable")]
public class CocktailDataSo : DataSo<CocktailData>
{
[field: SerializeField]
public int MaxLiquidCount { get; private set; } = 300;
protected override void OnEnable()
{
base.OnEnable();
@ -18,15 +21,10 @@ namespace BlueWater.Items
return;
}
#endif
var liquidController = FindAnyObjectByType<LiquidController>();
if (liquidController)
foreach (var element in _datas.Values)
{
var maxLiquidAmount = liquidController.GetMaxLiquidCount();
foreach (var element in _datas.Values)
{
element.ValidIngredients = element.GetValidIngredients(maxLiquidAmount);
}
element.ValidIngredients = element.GetValidIngredients(MaxLiquidCount);
}
}
}

View File

@ -285,3 +285,4 @@ MonoBehaviour:
<IngredientRatio5>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: ee344f47787d148448bd3373235281b6, type: 3}
<ValidIngredients>k__BackingField: []
<MaxLiquidCount>k__BackingField: 300

View File

@ -80,9 +80,6 @@ namespace BlueWater
[SerializeField, Tooltip("초당 생성되는 액체 수(ml)")]
private int _liquidsPerSecond = 100;
[SerializeField]
private int _maxLiquidCount = 300;
[SerializeField, Range(0f, 1f), Tooltip("목표 색상으로 변경되는데 걸리는 시간")]
private float _colorLerpSpeed = 0.5f;
@ -131,6 +128,7 @@ namespace BlueWater
private bool _isPouring;
private bool _isCompleted;
private float _elapsedTime = float.PositiveInfinity;
private int _maxLiquidCount;
private int _instanceLiquidCount;
private float _currentLiquidAmount;
private float _liquidReachedTime;
@ -184,6 +182,7 @@ namespace BlueWater
_completeCocktailImage.enabled = false;
_completeText.enabled = false;
_instanceLiquidCount = 0;
_maxLiquidCount = ItemManager.Instance.CocktailDataSo.MaxLiquidCount;
SetCurrentAmount(0f);
}

View File

@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@ -61,6 +62,8 @@ namespace BlueWater.Uis
_pressQAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, TycoonUiActions.PressQ);
_cancelAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, TycoonUiActions.Cancel);
_openManualBookAction.performed += OnOpen;
var allCocktails = ItemManager.Instance.CocktailDataSo.GetData();
_button = new List<ManualCocktailButton>(allCocktails.Count);
foreach (var element in allCocktails.Values)
@ -139,7 +142,6 @@ namespace BlueWater.Uis
EventManager.OnLevelUp += UpdateManualBook;
LocalizationSettings.SelectedLocaleChanged += OnChangedLocale;
_openManualBookAction.performed += OnOpen;
}
private void OnDestroy()
@ -175,12 +177,14 @@ namespace BlueWater.Uis
public override void Open()
{
AudioManager.Instance.PlaySfx(_manualSfxName, ignoreTimeScale: true);
if (!PopupUiController.IsPopupListEmpty()) return;
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
PopupUiController.RegisterPopup(this);
_panel.SetActive(true);
IsOpened = true;
AudioManager.Instance.PlaySfx(_manualSfxName, ignoreTimeScale: true);
}
public void OnClose(InputAction.CallbackContext context)

View File

@ -10201,7 +10201,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalPosition.z
value: -8.1
value: -7.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalRotation.w
@ -11503,7 +11503,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalPosition.z
value: -8.1
value: -7.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalRotation.w
@ -14044,7 +14044,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalPosition.z
value: -8.1
value: -7.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalRotation.w
@ -15089,7 +15089,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalPosition.z
value: -8.1
value: -7.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 1a59e4ec0cefb354688d7a267e281ffc, type: 3}
propertyPath: m_LocalRotation.w