//------------------------------------------------------------------------------ // // 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 AreaMmt : Bright.Config.BeanBase { public JSONNode json; public AreaMmt(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["TimelineID"].IsNumber) { throw new SerializationException(); } TimelineID = _json["TimelineID"]; } { if(!_json["StepCount"].IsNumber) { throw new SerializationException(); } StepCount = _json["StepCount"]; } { if(!_json["BuildingPrefeb"].IsString) { throw new SerializationException(); } BuildingPrefeb = _json["BuildingPrefeb"]; } { if(!_json["TimelinePlaytime"].IsNumber) { throw new SerializationException(); } TimelinePlaytime = _json["TimelinePlaytime"]; } { if(!_json["Name"]["key"].IsString) { throw new SerializationException(); } Name_l10n_key = _json["Name"]["key"]; if(!_json["Name"]["text"].IsString) { throw new SerializationException(); } Name = _json["Name"]["text"]; } { if(!_json["NameIndex"]["key"].IsString) { throw new SerializationException(); } NameIndex_l10n_key = _json["NameIndex"]["key"]; if(!_json["NameIndex"]["text"].IsString) { throw new SerializationException(); } NameIndex = _json["NameIndex"]["text"]; } { if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; } { if(!_json["Reward"].IsNumber) { throw new SerializationException(); } Reward = _json["Reward"]; } { var __json0 = _json["StepList"]; if(!__json0.IsArray) { throw new SerializationException(); } StepList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } StepList.Add(__v0); } } { if(!_json["PhotoSwitch"].IsString) { throw new SerializationException(); } PhotoSwitch = _json["PhotoSwitch"]; } { if(!_json["TurnOffFreeLook"].IsNumber) { throw new SerializationException(); } TurnOffFreeLook = _json["TurnOffFreeLook"]; } { if(!_json["TurnOffTimeScale"].IsNumber) { throw new SerializationException(); } TurnOffTimeScale = _json["TurnOffTimeScale"]; } json = _json; PostInit(); } public AreaMmt(int ID, int TimelineID, int StepCount, string BuildingPrefeb, float TimelinePlaytime, string Name, string NameIndex, string Icon, int Reward, System.Collections.Generic.List StepList, string PhotoSwitch, int TurnOffFreeLook, int TurnOffTimeScale ) { this.ID = ID; this.TimelineID = TimelineID; this.StepCount = StepCount; this.BuildingPrefeb = BuildingPrefeb; this.TimelinePlaytime = TimelinePlaytime; this.Name = Name; this.NameIndex = NameIndex; this.Icon = Icon; this.Reward = Reward; this.StepList = StepList; this.PhotoSwitch = PhotoSwitch; this.TurnOffFreeLook = TurnOffFreeLook; this.TurnOffTimeScale = TurnOffTimeScale; PostInit(); } public static AreaMmt DeserializeAreaMmt(JSONNode _json) { return new AreaMmt(_json); } public int ID { get; private set; } /// /// Building脚本中的序号,从0开始 /// public int TimelineID { get; private set; } public int StepCount { get; private set; } public string BuildingPrefeb { get; private set; } /// /// 不同prefeb转换的时候,上一个timeline播放时间 /// public float TimelinePlaytime { get; private set; } /// /// 多语言key + 中文 /// public string Name { get; private set; } public string Name_l10n_key { get; } /// /// 多语言key + 中文 /// public string NameIndex { get; private set; } public string NameIndex_l10n_key { get; } public string Icon { get; private set; } /// /// 对应Drop表主键 /// public int Reward { get; private set; } public System.Collections.Generic.List StepList { get; private set; } /// /// 在下一个prefeb填上一个多语言的key /// public string PhotoSwitch { get; private set; } /// /// 用于室内关闭lookfar和looknear功能
1 关闭 ///
public int TurnOffFreeLook { get; private set; } /// /// 用于室内关闭加速功能
1 关闭 ///
public int TurnOffTimeScale { get; private set; } public const int __ID__ = 918163175; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Name = translator(Name_l10n_key, Name); NameIndex = translator(NameIndex_l10n_key, NameIndex); } public override string ToString() { return "{ " + "ID:" + ID + "," + "TimelineID:" + TimelineID + "," + "StepCount:" + StepCount + "," + "BuildingPrefeb:" + BuildingPrefeb + "," + "TimelinePlaytime:" + TimelinePlaytime + "," + "Name:" + Name + "," + "NameIndex:" + NameIndex + "," + "Icon:" + Icon + "," + "Reward:" + Reward + "," + "StepList:" + Bright.Common.StringUtil.CollectionToString(StepList) + "," + "PhotoSwitch:" + PhotoSwitch + "," + "TurnOffFreeLook:" + TurnOffFreeLook + "," + "TurnOffTimeScale:" + TurnOffTimeScale + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }