인벤 ui작업

This commit is contained in:
김판돌 2024-03-06 22:45:33 +09:00
parent 5f19842b78
commit d155285e1e
1 changed files with 5 additions and 4 deletions

View File

@ -25,13 +25,14 @@ public class InvenItemPrefab : MonoBehaviour
ConsumableItem consumableItem = Statics.itemManager.box.FindConsumableItemDataId(consumableItemData.index); ConsumableItem consumableItem = Statics.itemManager.box.FindConsumableItemDataId(consumableItemData.index);
if (consumableItem != null) if (consumableItem != null)
{ {
this.count = 0; this.count = consumableItem.count;
gameObject.SetActive(false); gameObject.SetActive(this.count != 0);
} }
else else
{ {
this.count = consumableItem.count; this.count = 0;
gameObject.SetActive(true); gameObject.SetActive(false);
} }
} }
} }