55 lines
1.1 KiB
C#
55 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using RuntimeData;
|
|
using Logic.Multilingual;
|
|
|
|
public enum HintType
|
|
{
|
|
None,
|
|
CommonRecover,
|
|
CommonCapture,
|
|
CommonExamine,
|
|
CommonTrainUnit,
|
|
CommonCrop,
|
|
CommonFish,
|
|
CommonAnimal,
|
|
CommonMetal,
|
|
CommonFruit
|
|
};
|
|
|
|
|
|
[Serializable]
|
|
[CreateAssetMenu(fileName = "HintDataAssets", menuName = "TH1 Game Data/Hint Data Asset")]
|
|
public class HintDataAssets : ScriptableObject
|
|
{
|
|
public List<HintInfo> HintDataList = new List<HintInfo>();
|
|
[NonSerialized]
|
|
private bool _initialized = false;
|
|
|
|
public bool GetHintInfo(HintType HintType,out HintInfo info)
|
|
{
|
|
info = null;
|
|
foreach (var t in HintDataList)
|
|
{
|
|
if (t.HintType == HintType)
|
|
{
|
|
info = t;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
[Serializable]
|
|
public class HintInfo
|
|
{
|
|
public HintType HintType;
|
|
[MultilingualField]
|
|
public string HintName;
|
|
[MultilingualField]
|
|
public string HintContent;
|
|
}
|