NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/DataTable/LevelCfg/DataLevel.cs

164 lines
8.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//------------------------------------------------------------------------------
// <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.LevelCfg
{
public sealed partial class DataLevel : Bright.Config.BeanBase
{
public DataLevel(JSONNode _json)
{
{ if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = _json["Id"]; }
{ if(!_json["ChapterID"].IsNumber) { throw new SerializationException(); } ChapterID = _json["ChapterID"]; }
{ if(!_json["Index"].IsNumber) { throw new SerializationException(); } Index = _json["Index"]; }
{ var __json0 = _json["Unlock"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; Unlock = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Unlock[__index0++] = __v0; } }
{ var __json0 = _json["CostItems"]; if(!__json0.IsArray) { throw new SerializationException(); } CostItems = new System.Collections.Generic.List<item.ItemCounts>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { item.ItemCounts __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = item.ItemCounts.DeserializeItemCounts(__e0); } CostItems.Add(__v0); } }
{ var __json0 = _json["NormalRewardID"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; NormalRewardID = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } NormalRewardID[__index0++] = __v0; } }
{ var __json0 = _json["FristRewardID"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; FristRewardID = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FristRewardID[__index0++] = __v0; } }
{ var __json0 = _json["StarRewardID_1"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; StarRewardID1 = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } StarRewardID1[__index0++] = __v0; } }
{ var __json0 = _json["StarRewardID_2"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; StarRewardID2 = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } StarRewardID2[__index0++] = __v0; } }
{ var __json0 = _json["StarRewardID_3"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; StarRewardID3 = new int[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } StarRewardID3[__index0++] = __v0; } }
{ if(!_json["SettleExp"].IsNumber) { throw new SerializationException(); } SettleExp = _json["SettleExp"]; }
{ if(!_json["SettleLikability"].IsNumber) { throw new SerializationException(); } SettleLikability = _json["SettleLikability"]; }
{ if(!_json["FileName"].IsString) { throw new SerializationException(); } FileName = _json["FileName"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["Desc"].IsString) { throw new SerializationException(); } Desc = _json["Desc"]; }
PostInit();
}
public DataLevel(int Id, int ChapterID, int Index, int[] Unlock, System.Collections.Generic.List<item.ItemCounts> CostItems, int[] NormalRewardID, int[] FristRewardID, int[] StarRewardID_1, int[] StarRewardID_2, int[] StarRewardID_3, int SettleExp, int SettleLikability, string FileName, string Name, string Desc )
{
this.Id = Id;
this.ChapterID = ChapterID;
this.Index = Index;
this.Unlock = Unlock;
this.CostItems = CostItems;
this.NormalRewardID = NormalRewardID;
this.FristRewardID = FristRewardID;
this.StarRewardID1 = StarRewardID_1;
this.StarRewardID2 = StarRewardID_2;
this.StarRewardID3 = StarRewardID_3;
this.SettleExp = SettleExp;
this.SettleLikability = SettleLikability;
this.FileName = FileName;
this.Name = Name;
this.Desc = Desc;
PostInit();
}
public static DataLevel DeserializeDataLevel(JSONNode _json)
{
return new LevelCfg.DataLevel(_json);
}
/// <summary>
/// 关卡ID
/// </summary>
public int Id { get; private set; }
/// <summary>
/// 章节Id
/// </summary>
public int ChapterID { get; private set; }
/// <summary>
/// 序列号同一chapter中排序
/// </summary>
public int Index { get; private set; }
/// <summary>
/// 解锁条件
/// </summary>
public int[] Unlock { get; private set; }
/// <summary>
/// 消耗道具
/// </summary>
public System.Collections.Generic.List<item.ItemCounts> CostItems { get; private set; }
/// <summary>
/// 常规通关奖励
/// </summary>
public int[] NormalRewardID { get; private set; }
/// <summary>
/// 首次通关奖励
/// </summary>
public int[] FristRewardID { get; private set; }
/// <summary>
/// 首通一星奖励
/// </summary>
public int[] StarRewardID1 { get; private set; }
/// <summary>
/// 首通二星奖励
/// </summary>
public int[] StarRewardID2 { get; private set; }
/// <summary>
/// 首通三星奖励
/// </summary>
public int[] StarRewardID3 { get; private set; }
/// <summary>
/// 结算经验
/// </summary>
public int SettleExp { get; private set; }
/// <summary>
/// 结算好感度
/// </summary>
public int SettleLikability { get; private set; }
/// <summary>
/// 文件名
/// </summary>
public string FileName { get; private set; }
/// <summary>
/// 关卡名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 关卡描述
/// </summary>
public string Desc { get; private set; }
public const int __ID__ = -1884167220;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var _e in CostItems) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var _e in CostItems) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "ChapterID:" + ChapterID + ","
+ "Index:" + Index + ","
+ "Unlock:" + Bright.Common.StringUtil.CollectionToString(Unlock) + ","
+ "CostItems:" + Bright.Common.StringUtil.CollectionToString(CostItems) + ","
+ "NormalRewardID:" + Bright.Common.StringUtil.CollectionToString(NormalRewardID) + ","
+ "FristRewardID:" + Bright.Common.StringUtil.CollectionToString(FristRewardID) + ","
+ "StarRewardID1:" + Bright.Common.StringUtil.CollectionToString(StarRewardID1) + ","
+ "StarRewardID2:" + Bright.Common.StringUtil.CollectionToString(StarRewardID2) + ","
+ "StarRewardID3:" + Bright.Common.StringUtil.CollectionToString(StarRewardID3) + ","
+ "SettleExp:" + SettleExp + ","
+ "SettleLikability:" + SettleLikability + ","
+ "FileName:" + FileName + ","
+ "Name:" + Name + ","
+ "Desc:" + Desc + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}