备份CatanBuilding瘦身独立工程
This commit is contained in:
65
Assets/Scripts/Tables/TbRodWaitingZone.cs
Normal file
65
Assets/Scripts/Tables/TbRodWaitingZone.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
|
||||
public sealed partial class TbRodWaitingZone
|
||||
{
|
||||
private readonly Dictionary<int, RodWaitingZone> _dataMap;
|
||||
private readonly List<RodWaitingZone> _dataList;
|
||||
|
||||
public TbRodWaitingZone(JSONNode _json)
|
||||
{
|
||||
_dataMap = new Dictionary<int, RodWaitingZone>();
|
||||
_dataList = new List<RodWaitingZone>();
|
||||
|
||||
foreach(JSONNode _row in _json.Children)
|
||||
{
|
||||
var _v = RodWaitingZone.DeserializeRodWaitingZone(_row);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.ID, _v);
|
||||
}
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public Dictionary<int, RodWaitingZone> DataMap => _dataMap;
|
||||
public List<RodWaitingZone> DataList => _dataList;
|
||||
|
||||
public RodWaitingZone GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public RodWaitingZone Get(int key) => _dataMap[key];
|
||||
public RodWaitingZone this[int key] => _dataMap[key];
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
foreach(var v in _dataList)
|
||||
{
|
||||
v.Resolve(_tables);
|
||||
}
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
foreach(var v in _dataList)
|
||||
{
|
||||
v.TranslateText(translator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user