备份CatanBuilding瘦身独立工程
This commit is contained in:
58
Assets/Scripts/Tables/TbEventScratchConfig.cs
Normal file
58
Assets/Scripts/Tables/TbEventScratchConfig.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 TbEventScratchConfig
|
||||
{
|
||||
|
||||
private readonly EventScratchConfig _data;
|
||||
|
||||
public TbEventScratchConfig(JSONNode _json)
|
||||
{
|
||||
if(!_json.IsArray)
|
||||
{
|
||||
throw new SerializationException();
|
||||
}
|
||||
if (_json.Count != 1) throw new SerializationException("table mode=one, but size != 1");
|
||||
_data = EventScratchConfig.DeserializeEventScratchConfig(_json[0]);
|
||||
PostInit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 核心区域所需要的刮开的面积占核心区域面积比
|
||||
/// </summary>
|
||||
public float CoreScratchPercent => _data.CoreScratchPercent;
|
||||
/// <summary>
|
||||
/// 全部区域所需要的刮开的面积占比
|
||||
/// </summary>
|
||||
public float TotalScratchPercent => _data.TotalScratchPercent;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
_data.Resolve(_tables);
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
_data.TranslateText(translator);
|
||||
}
|
||||
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user