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} _liquidObject: {fileID: -7612237390858616641, guid: 231c2f369e2946745a955eb49243702b, type: 3}
_garnishObject: {fileID: 5803694563079548352, guid: f051d09e1e3043d4285ae8e0ff4c4f12, type: 3} _garnishObject: {fileID: 5803694563079548352, guid: f051d09e1e3043d4285ae8e0ff4c4f12, type: 3}
_liquidsPerSecond: 100 _liquidsPerSecond: 100
_maxLiquidCount: 300
_colorLerpSpeed: 0.5 _colorLerpSpeed: 0.5
_colorIntensity: 2 _colorIntensity: 2
_reachedLerpPosition: {x: -10.5, y: 4} _reachedLerpPosition: {x: -10.5, y: 4}

View File

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

View File

@ -8,6 +8,9 @@ namespace BlueWater.Items
[CreateAssetMenu(fileName = "CocktailDataTable", menuName = "ScriptableObjects/CocktailDataTable")] [CreateAssetMenu(fileName = "CocktailDataTable", menuName = "ScriptableObjects/CocktailDataTable")]
public class CocktailDataSo : DataSo<CocktailData> public class CocktailDataSo : DataSo<CocktailData>
{ {
[field: SerializeField]
public int MaxLiquidCount { get; private set; } = 300;
protected override void OnEnable() protected override void OnEnable()
{ {
base.OnEnable(); base.OnEnable();
@ -19,14 +22,9 @@ namespace BlueWater.Items
} }
#endif #endif
var liquidController = FindAnyObjectByType<LiquidController>();
if (liquidController)
{
var maxLiquidAmount = liquidController.GetMaxLiquidCount();
foreach (var element in _datas.Values) 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 <IngredientRatio5>k__BackingField: 0
<Sprite>k__BackingField: {fileID: 21300000, guid: ee344f47787d148448bd3373235281b6, type: 3} <Sprite>k__BackingField: {fileID: 21300000, guid: ee344f47787d148448bd3373235281b6, type: 3}
<ValidIngredients>k__BackingField: [] <ValidIngredients>k__BackingField: []
<MaxLiquidCount>k__BackingField: 300

View File

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

View File

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

View File

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