ProjectDDD/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Classes/CookwareDataAsset.cs

23 lines
740 B
C#

// <auto-generated> File: CookwareDataAsset.cs
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace DDD
{
[CreateAssetMenu(fileName = "CookwareDataAsset", menuName = "GoogleSheet/CookwareDataAsset")]
public class CookwareDataAsset : DataAsset<CookwareDataEntry>
{
public bool TryGetValueByCookwareType(CookwareType cookwareType, out CookwareDataEntry cookwareDataEntry)
{
if (_datas == null)
{
cookwareDataEntry = null;
return false;
}
cookwareDataEntry = _datas.FirstOrDefault(data => data != null && data.CookwareType == cookwareType);
return cookwareDataEntry != null;
}
}
}