//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
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();
}
///
/// 核心区域所需要的刮开的面积占核心区域面积比
///
public float CoreScratchPercent => _data.CoreScratchPercent;
///
/// 全部区域所需要的刮开的面积占比
///
public float TotalScratchPercent => _data.TotalScratchPercent;
public void Resolve(Dictionary _tables)
{
_data.Resolve(_tables);
PostResolve();
}
public void TranslateText(System.Func translator)
{
_data.TranslateText(translator);
}
partial void PostInit();
partial void PostResolve();
}
}