yyl
3 天以前 61b188e1d59af9a1e3b4f005bd4b9211b2db97d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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;
    }
}