Files
back_cantanBuilding/Assets/Scripts/Tables/TbEventScratchConfig.cs
2026-05-26 16:15:54 +08:00

58 lines
1.5 KiB
C#

//------------------------------------------------------------------------------
// <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();
}
}