인벤토리/퀵슬롯 시스템 개발
This commit is contained in:
@@ -97,9 +97,7 @@ public class DroppedItem : NetworkBehaviour, IInteractable
|
||||
if (playerObj.TryGetComponent<PlayerInventory>(out var inventory))
|
||||
{
|
||||
_isProcessed = true;
|
||||
ItemData data = ItemDatabase.Instance.GetItemByID(_itemDataID.Value);
|
||||
|
||||
inventory.AddItem(data); // 인벤토리에 추가
|
||||
inventory.AddItemRpc(_itemDataID.Value, 1); // 인벤토리에 추가
|
||||
|
||||
// 3. 획득 성공 시 네트워크 상에서 제거합니다.
|
||||
GetComponent<NetworkObject>().Despawn();
|
||||
|
||||
Reference in New Issue
Block a user