少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-13 6516a59bda62d05f9e9a4786016560cdf8cc71e2
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
using System;
using System.Collections.Generic;
 
public partial class PlayerPropertyConfig : IConfigPostProcess
{
    private static Dictionary<int, List<PlayerPropertyConfig>> m_PropCfgs = new Dictionary<int, List<PlayerPropertyConfig>>();
 
    public void OnConfigParseCompleted()
    {
        List<PlayerPropertyConfig> list = null;
        m_PropCfgs.TryGetValue(type, out list);
        if (list != null)
        {
            list.Add(this);
        }
        else
        {
            list = new List<PlayerPropertyConfig>();
            list.Add(this);
            m_PropCfgs.Add(type, list);
        }
    }
 
    public static List<PlayerPropertyConfig> GetPropByType(int type)
    {
        List<PlayerPropertyConfig> list = null;
        m_PropCfgs.TryGetValue(type, out list);
        return list;
    }
}