ProjectDDD/Assets/_DDD/_Scripts/GameState/InventoryItemData.cs

23 lines
508 B
C#
Raw Normal View History

2025-07-29 15:56:47 +00:00
using System;
using UnityEngine;
namespace DDD
{
2025-07-29 15:56:47 +00:00
[Serializable]
public class InventoryItemData : IId
{
2025-07-29 15:56:47 +00:00
[field: SerializeField]
public string Id { get; set; }
2025-07-29 15:56:47 +00:00
[field: SerializeField]
public int Quantity { get; set; }
public InventoryItemData(string id, int quantity)
{
Id = id;
Quantity = quantity;
}
2025-07-25 07:58:53 +00:00
public ItemData ItemData => InventoryManager.Instance.GetItemDataByIdOrNull(Id);
}
}