//------------------------------------------------------------------------------ // // 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 Construction : Bright.Config.BeanBase { public JSONNode json; public Construction(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["IsABTest"].IsBoolean) { throw new SerializationException(); } IsABTest = _json["IsABTest"]; } { 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["InitialLevel"].IsNumber) { throw new SerializationException(); } InitialLevel = _json["InitialLevel"]; } { if(!_json["NextID"].IsNumber) { throw new SerializationException(); } NextID = _json["NextID"]; } { if(!_json["Prefab"].IsString) { throw new SerializationException(); } Prefab = _json["Prefab"]; } { if(!_json["BombPrefab"].IsString) { throw new SerializationException(); } BombPrefab = _json["BombPrefab"]; } { if(!_json["BGM"].IsString) { throw new SerializationException(); } BGM = _json["BGM"]; } { var __json0 = _json["AreaList"]; if(!__json0.IsArray) { throw new SerializationException(); } AreaList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } AreaList.Add(__v0); } } { var __json0 = _json["MmtAreaList"]; if(!__json0.IsArray) { throw new SerializationException(); } MmtAreaList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MmtAreaList.Add(__v0); } } json = _json; PostInit(); } public Construction(int ID, bool IsABTest, string Name, int InitialLevel, int NextID, string Prefab, string BombPrefab, string BGM, System.Collections.Generic.List AreaList, System.Collections.Generic.List MmtAreaList ) { this.ID = ID; this.IsABTest = IsABTest; this.Name = Name; this.InitialLevel = InitialLevel; this.NextID = NextID; this.Prefab = Prefab; this.BombPrefab = BombPrefab; this.BGM = BGM; this.AreaList = AreaList; this.MmtAreaList = MmtAreaList; PostInit(); } public static Construction DeserializeConstruction(JSONNode _json) { return new Construction(_json); } /// /// 主键,唯一标识 /// public int ID { get; private set; } /// /// 0:否
1:是
是AB Test的场景不会展示 ///
public bool IsABTest { get; private set; } /// /// 多语言key + 中文 /// public string Name { get; private set; } public string Name_l10n_key { get; } public int InitialLevel { get; private set; } /// /// 对应本表主键
-1则为结束 ///
public int NextID { get; private set; } /// /// 此列已作废 /// public string Prefab { get; private set; } public string BombPrefab { get; private set; } /// /// 音频资源 /// public string BGM { get; private set; } public System.Collections.Generic.List AreaList { get; private set; } public System.Collections.Generic.List MmtAreaList { get; private set; } public const int __ID__ = -1831639823; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Name = translator(Name_l10n_key, Name); } public override string ToString() { return "{ " + "ID:" + ID + "," + "IsABTest:" + IsABTest + "," + "Name:" + Name + "," + "InitialLevel:" + InitialLevel + "," + "NextID:" + NextID + "," + "Prefab:" + Prefab + "," + "BombPrefab:" + BombPrefab + "," + "BGM:" + BGM + "," + "AreaList:" + Bright.Common.StringUtil.CollectionToString(AreaList) + "," + "MmtAreaList:" + Bright.Common.StringUtil.CollectionToString(MmtAreaList) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }