using UnityEditor;
using UnityEngine;
[System.Serializable]
public class EquippableItemPrefabAsset : PrefabAssetModel
{
[SerializeField]
public EquippableItem EquippableItem = null;
public EquippableItemPrefabAsset() { }
public EquippableItemPrefabAsset(string _name, string _prefabAssetName, Vector3 _position, EquippableItem _equippableItem = null)
: base(_name, _prefabAssetName, _position)
{
EquippableItem = _equippableItem;
}
///
///
///
///
///
///
/// the name by which the system will search for the item
public EquippableItemPrefabAsset(string _name, string _prefabAssetName, Vector3 _position, string _equippableItemName)
: base(_name, _prefabAssetName, _position)
{
// 3.2 set EquippableItem object
EquippableItem = Resources.Load("Items/" + _equippableItemName);
}
///
/// Function to convert Prefab Asset model to data object
///
///
public EquippableItemPrefabAssetData MapPrefabAssetModelToData()
{
return new EquippableItemPrefabAssetData(this);
}
}