2026-03-26 인벤토리
This commit is contained in:
33
Assets/02_Scripts/Item/Item.cs
Normal file
33
Assets/02_Scripts/Item/Item.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
|
||||
public enum ItemType
|
||||
{
|
||||
EQUIPMENT = 0,
|
||||
CONSUMABLE = 1
|
||||
}
|
||||
|
||||
[CreateAssetMenu(fileName = "New Item", menuName = "Item")]
|
||||
public class Item : ScriptableObject
|
||||
{
|
||||
public string ItemId;
|
||||
public ItemType ItemType;
|
||||
public int SortId;
|
||||
public string ItemName;
|
||||
public Sprite Icon; //인벤토리용 2D 아이콘
|
||||
[TextArea] public string Description;
|
||||
public bool IsStackable; // 중첩 가능 여부
|
||||
public int MaxStack = 99; //장비는 1개
|
||||
public int Rarity = 1; //기본등급 1
|
||||
|
||||
// 월드용 데이터
|
||||
public GameObject PrefabVisible; // 월드상에서 보일 아이템의 프리팹
|
||||
public GameObject PrefabTuning; // 위치,회전 등이 조정된 모델
|
||||
public GameObject PrefabWild; // 아무런 조정도 하지 않은 아이템의 진짜 원본
|
||||
|
||||
public Vector3 WorldScale = Vector3.one; // 아이템마다 다른 크기 조절이 필요할 때
|
||||
public Vector3 WorldRotation = Vector3.zero;
|
||||
|
||||
[Header("Collider Settings")]
|
||||
public Vector3 ColliderCenter = Vector3.zero;
|
||||
public Vector3 ColliderSize = Vector3.one;
|
||||
}
|
||||
Reference in New Issue
Block a user