备份CatanBuilding瘦身独立工程
This commit is contained in:
103
Assets/Scripts/Tables/Robot.cs
Normal file
103
Assets/Scripts/Tables/Robot.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Robot : Bright.Config.BeanBase
|
||||
{
|
||||
public JSONNode json;
|
||||
public Robot(JSONNode _json)
|
||||
{
|
||||
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
||||
{ 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["Avatar"].IsString) { throw new SerializationException(); } Avatar = _json["Avatar"]; }
|
||||
{ if(!_json["ConstructionOffset"].IsNumber) { throw new SerializationException(); } ConstructionOffset = _json["ConstructionOffset"]; }
|
||||
{ if(!_json["HatchEggPots"].IsNumber) { throw new SerializationException(); } HatchEggPots = _json["HatchEggPots"]; }
|
||||
{ if(!_json["HatchProb"].IsNumber) { throw new SerializationException(); } HatchProb = _json["HatchProb"]; }
|
||||
{ var __json0 = _json["MatureProgress"]; if(!__json0.IsArray) { throw new SerializationException(); } MatureProgress = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } MatureProgress.Add(__v0); } }
|
||||
json = _json;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public Robot(int ID, string Name, string Avatar, int ConstructionOffset, int HatchEggPots, float HatchProb, System.Collections.Generic.List<float> MatureProgress )
|
||||
{
|
||||
this.ID = ID;
|
||||
this.Name = Name;
|
||||
this.Avatar = Avatar;
|
||||
this.ConstructionOffset = ConstructionOffset;
|
||||
this.HatchEggPots = HatchEggPots;
|
||||
this.HatchProb = HatchProb;
|
||||
this.MatureProgress = MatureProgress;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static Robot DeserializeRobot(JSONNode _json)
|
||||
{
|
||||
return new Robot(_json);
|
||||
}
|
||||
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// 名字
|
||||
/// </summary>
|
||||
public string Name { get; private set; }
|
||||
public string Name_l10n_key { get; }
|
||||
public string Avatar { get; private set; }
|
||||
/// <summary>
|
||||
/// 正为比玩家领先对应数量的场景<br/>负为比玩家落后对应数量的场景
|
||||
/// </summary>
|
||||
public int ConstructionOffset { get; private set; }
|
||||
/// <summary>
|
||||
/// 孵化的槽位数量
|
||||
/// </summary>
|
||||
public int HatchEggPots { get; private set; }
|
||||
/// <summary>
|
||||
/// 每个蛋的孵化概率
|
||||
/// </summary>
|
||||
public float HatchProb { get; private set; }
|
||||
/// <summary>
|
||||
/// 每个蛋的成熟进度
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<float> MatureProgress { get; private set; }
|
||||
|
||||
public const int __ID__ = 79133258;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
Name = translator(Name_l10n_key, Name);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "ID:" + ID + ","
|
||||
+ "Name:" + Name + ","
|
||||
+ "Avatar:" + Avatar + ","
|
||||
+ "ConstructionOffset:" + ConstructionOffset + ","
|
||||
+ "HatchEggPots:" + HatchEggPots + ","
|
||||
+ "HatchProb:" + HatchProb + ","
|
||||
+ "MatureProgress:" + Bright.Common.StringUtil.CollectionToString(MatureProgress) + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user