using System.Collections.Generic;
|
public partial class PresetUnlockConfig : ConfigBase<int, PresetUnlockConfig>
|
{
|
static Dictionary<int, Dictionary<int, PresetUnlockConfig>> m_PresetUnlockDict = new Dictionary<int, Dictionary<int, PresetUnlockConfig>>();
|
|
protected override void OnConfigParseCompleted()
|
{
|
if (!m_PresetUnlockDict.ContainsKey(PresetType))
|
{
|
m_PresetUnlockDict[PresetType] = new Dictionary<int, PresetUnlockConfig>();
|
}
|
m_PresetUnlockDict[PresetType][PresetID] = this;
|
}
|
|
public static PresetUnlockConfig GetPresetUnlockConfig(int presetType, int presetID)
|
{
|
if (m_PresetUnlockDict.ContainsKey(presetType) && m_PresetUnlockDict[presetType].ContainsKey(presetID))
|
{
|
return m_PresetUnlockDict[presetType][presetID];
|
}
|
return null;
|
}
|
|
}
|