0.3.2.2 업데이트
This commit is contained in:
parent
9b82a39ff1
commit
99a8e9b653
@ -53,6 +53,7 @@ namespace BlueWater.Items
|
||||
[field: SerializeField, BoxGroup("직접 추가하는 영역")]
|
||||
public Sprite Sprite { get; set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public List<CocktailIngredient> ValidIngredients { get; set; } = new(5);
|
||||
|
||||
public List<CocktailIngredient> GetValidIngredients(int liquidMaxAmount)
|
||||
|
@ -1,3 +1,6 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Items
|
||||
@ -7,15 +10,23 @@ namespace BlueWater.Items
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
base.OnEnable();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (!EditorApplication.isPlayingOrWillChangePlaymode)
|
||||
{
|
||||
Debug.Log("실행 중 아님");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
var maxLiquidAmount = FindAnyObjectByType<LiquidController>().GetMaxLiquidCount();
|
||||
foreach (var element in _datas.Values)
|
||||
{
|
||||
element.ValidIngredients = element.GetValidIngredients(maxLiquidAmount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -14,8 +14,6 @@ namespace BlueWater.Items
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
InitializeDictionary();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user