using System.Collections.Generic;
|
using UnityEngine;
|
|
public partial class GuideConfig : ConfigBase<int, GuideConfig>
|
{
|
public static Dictionary<string, List<int>> winToGuidesDic = new Dictionary<string, List<int>>();
|
|
public static Dictionary<int, List<int>> typeToGuidesDic = new Dictionary<int, List<int>>();
|
|
protected override void OnConfigParseCompleted()
|
{
|
base.OnConfigParseCompleted();
|
|
List<int> list = null;
|
if (!winToGuidesDic.TryGetValue(WinName, out list))
|
{
|
list = new List<int>();
|
winToGuidesDic.Add(WinName, list);
|
}
|
list.Add(ID);
|
|
List<int> list2 = null;
|
if (!typeToGuidesDic.TryGetValue(TriggerType, out list2))
|
{
|
list2 = new List<int>();
|
typeToGuidesDic.Add(TriggerType, list2);
|
}
|
list2.Add(ID);
|
}
|
|
|
public static List<int> GetGuideListByWinName(string winName)
|
{
|
List<int> list = null;
|
if (winToGuidesDic.TryGetValue(winName, out list))
|
{
|
return list;
|
}
|
return null;
|
}
|
|
public static List<int> GetGuideListByType(int type)
|
{
|
List<int> list = null;
|
if (typeToGuidesDic.TryGetValue(type, out list))
|
{
|
return list;
|
}
|
return null;
|
}
|
}
|