2026-04-17 장보기 목록 버튼 할당 진행중
This commit is contained in:
@@ -10,22 +10,24 @@ public class ItemData : ScriptableObject
|
||||
[SerializeField] private string _displayName;
|
||||
[SerializeField] private string _brand;
|
||||
[SerializeField] private ItemCategory _category;
|
||||
[SerializeField] private ProductGroup _productGroup;
|
||||
|
||||
[Header("Pricing")]
|
||||
[SerializeField, Min(0)] private int _basePrice;
|
||||
[SerializeField, Range(0f, 1f)] private float _discountRate;
|
||||
|
||||
[Header("Visuals")]
|
||||
[SerializeField] private Sprite _icon;
|
||||
//[SerializeField] private Sprite _icon;
|
||||
[SerializeField] private GameObject _prefab;
|
||||
|
||||
public string ItemId => _itemId;
|
||||
public string DisplayName => _displayName;
|
||||
public string Brand => _brand;
|
||||
public ItemCategory Category => _category;
|
||||
public ProductGroup ProductGroup => _productGroup;
|
||||
public int BasePrice => _basePrice;
|
||||
public float DiscountRate => _discountRate;
|
||||
public Sprite Icon => _icon;
|
||||
//public Sprite Icon => _icon;
|
||||
public GameObject Prefab => _prefab;
|
||||
|
||||
public int FinalPrice => Mathf.RoundToInt(_basePrice * (1f - _discountRate));
|
||||
@@ -43,4 +45,11 @@ public enum ItemCategory
|
||||
Household,
|
||||
Etc
|
||||
}
|
||||
|
||||
public enum ProductGroup
|
||||
{
|
||||
None,
|
||||
ChocoBar,
|
||||
PotatoChip,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user