using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
|
namespace TableConfig
|
{
|
public partial class LoadingBackGroundConfig : ConfigBase, IConfigPostProcess
|
{
|
static Dictionary<int, Dictionary<int, LoadingBackGroundConfig>> configs = new Dictionary<int, Dictionary<int, LoadingBackGroundConfig>>();
|
|
public void OnConfigParseCompleted()
|
{
|
if (!configs.ContainsKey(this.id))
|
{
|
configs[this.id] = new Dictionary<int, LoadingBackGroundConfig>();
|
}
|
|
configs[this.id][this.lineId] = this;
|
}
|
|
|
public static LoadingBackGroundConfig Get(int dataId, int lineId)
|
{
|
if (!configs.ContainsKey(dataId))
|
{
|
return null;
|
}
|
|
var lineConfigs = configs[dataId];
|
if (lineConfigs.ContainsKey(lineId))
|
{
|
return lineConfigs[lineId];
|
}
|
|
if (lineConfigs.ContainsKey(0))
|
{
|
return lineConfigs[0];
|
}
|
|
return null;
|
}
|
|
}
|
|
}
|