virtual carriable 클래스 추가
This commit is contained in:
parent
d0c799f177
commit
da03795275
28
Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs
Normal file
28
Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class VirtualItem : ICarriable
|
||||
{
|
||||
private readonly string _itemId;
|
||||
|
||||
public VirtualItem(string itemId)
|
||||
{
|
||||
_itemId = itemId;
|
||||
}
|
||||
|
||||
public string GetCarrierId() => _itemId;
|
||||
public CarriableType GetCarriableType() => CarriableType.VirtualItem;
|
||||
public GameObject GetGameObject() => null;
|
||||
|
||||
public bool CanCarry()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnCarried(ICarrier carrier)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs.meta
Normal file
3
Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58df8ac36f774d3293a0eee9226914f2
|
||||
timeCreated: 1756455026
|
Loading…
Reference in New Issue
Block a user