42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Logic.Action;
|
|
using Logic.Multilingual;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
[CreateAssetMenu(fileName = "MobilityDataAssets", menuName = "TH1 Game Data/Mobility Data Asset")]
|
|
public class MobilityDataAssets : ScriptableObject
|
|
{
|
|
public List<MobilityTypeInfo> MobilityTypeInfoList;
|
|
public List<LandTypeInfo> LandTypeInfoList;
|
|
|
|
public string GetLandTypeText_DECODE(LandType landType)
|
|
{
|
|
foreach(var item in LandTypeInfoList)
|
|
if (item.LandType == landType)
|
|
return MultilingualManager.Instance.GetMultilingualTextSafe(item.LandName);
|
|
return "-";
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class MobilityTypeInfo
|
|
{
|
|
public LandType MobilityType;
|
|
public List<MobilityType> MobilityGroup;
|
|
}
|
|
|
|
[Serializable]
|
|
public class LandTypeInfo
|
|
{
|
|
public LandType LandType;
|
|
[MultilingualField]
|
|
public string LandName;
|
|
}
|
|
[Serializable]
|
|
public enum MobilityType{Sky,Ground,Water,Port,Ashore}
|
|
|
|
[Serializable]
|
|
public enum LandType { None,LandAndPort,WaterAndAshore,LandOnly,WaterOnly,LandAndWater,Fly}
|