178 lines
8.2 KiB
C#
178 lines
8.2 KiB
C#
//------------------------------------------------------------------------------
|
|
// <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 AquariumFish : Bright.Config.BeanBase
|
|
{
|
|
public JSONNode json;
|
|
public AquariumFish(JSONNode _json)
|
|
{
|
|
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
|
|
{ var __json0 = _json["GrowthTime"]; if(!__json0.IsArray) { throw new SerializationException(); } GrowthTime = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } GrowthTime.Add(__v0); } }
|
|
{ if(!_json["SoldReward"].IsNumber) { throw new SerializationException(); } SoldReward = _json["SoldReward"]; }
|
|
{ if(!_json["SoldRewardRand"].IsNumber) { throw new SerializationException(); } SoldRewardRand = _json["SoldRewardRand"]; }
|
|
{ if(!_json["GrowthExtraSoldReward"].IsNumber) { throw new SerializationException(); } GrowthExtraSoldReward = _json["GrowthExtraSoldReward"]; }
|
|
{ if(!_json["MutantProb"].IsNumber) { throw new SerializationException(); } MutantProb = _json["MutantProb"]; }
|
|
{ if(!_json["MutantExtraSoldReward"].IsNumber) { throw new SerializationException(); } MutantExtraSoldReward = _json["MutantExtraSoldReward"]; }
|
|
{ if(!_json["MutantGrowthExtraSoldReward"].IsNumber) { throw new SerializationException(); } MutantGrowthExtraSoldReward = _json["MutantGrowthExtraSoldReward"]; }
|
|
{ if(!_json["AttackReward"].IsNumber) { throw new SerializationException(); } AttackReward = _json["AttackReward"]; }
|
|
{ if(!_json["StealProb"].IsNumber) { throw new SerializationException(); } StealProb = _json["StealProb"]; }
|
|
{ if(!_json["StealExtraReward"].IsNumber) { throw new SerializationException(); } StealExtraReward = _json["StealExtraReward"]; }
|
|
{ if(!_json["AttackMutantExtraReward"].IsNumber) { throw new SerializationException(); } AttackMutantExtraReward = _json["AttackMutantExtraReward"]; }
|
|
{ if(!_json["StealMutantProb"].IsNumber) { throw new SerializationException(); } StealMutantProb = _json["StealMutantProb"]; }
|
|
{ if(!_json["StealMutantExtraReward"].IsNumber) { throw new SerializationException(); } StealMutantExtraReward = _json["StealMutantExtraReward"]; }
|
|
{ if(!_json["StealRewardRand"].IsNumber) { throw new SerializationException(); } StealRewardRand = _json["StealRewardRand"]; }
|
|
{ var __json0 = _json["RecoveryTime"]; if(!__json0.IsArray) { throw new SerializationException(); } RecoveryTime = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } RecoveryTime.Add(__v0); } }
|
|
{ if(!_json["RealStealProb"].IsNumber) { throw new SerializationException(); } RealStealProb = _json["RealStealProb"]; }
|
|
json = _json;
|
|
PostInit();
|
|
}
|
|
|
|
public AquariumFish(int ID, System.Collections.Generic.List<float> GrowthTime, int SoldReward, float SoldRewardRand, float GrowthExtraSoldReward, float MutantProb, float MutantExtraSoldReward, float MutantGrowthExtraSoldReward, int AttackReward, float StealProb, float StealExtraReward, float AttackMutantExtraReward, float StealMutantProb, float StealMutantExtraReward, float StealRewardRand, System.Collections.Generic.List<float> RecoveryTime, float RealStealProb )
|
|
{
|
|
this.ID = ID;
|
|
this.GrowthTime = GrowthTime;
|
|
this.SoldReward = SoldReward;
|
|
this.SoldRewardRand = SoldRewardRand;
|
|
this.GrowthExtraSoldReward = GrowthExtraSoldReward;
|
|
this.MutantProb = MutantProb;
|
|
this.MutantExtraSoldReward = MutantExtraSoldReward;
|
|
this.MutantGrowthExtraSoldReward = MutantGrowthExtraSoldReward;
|
|
this.AttackReward = AttackReward;
|
|
this.StealProb = StealProb;
|
|
this.StealExtraReward = StealExtraReward;
|
|
this.AttackMutantExtraReward = AttackMutantExtraReward;
|
|
this.StealMutantProb = StealMutantProb;
|
|
this.StealMutantExtraReward = StealMutantExtraReward;
|
|
this.StealRewardRand = StealRewardRand;
|
|
this.RecoveryTime = RecoveryTime;
|
|
this.RealStealProb = RealStealProb;
|
|
PostInit();
|
|
}
|
|
|
|
public static AquariumFish DeserializeAquariumFish(JSONNode _json)
|
|
{
|
|
return new AquariumFish(_json);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编号
|
|
/// </summary>
|
|
public int ID { get; private set; }
|
|
/// <summary>
|
|
/// 成长时间
|
|
/// </summary>
|
|
public System.Collections.Generic.List<float> GrowthTime { get; private set; }
|
|
/// <summary>
|
|
/// 售卖奖励
|
|
/// </summary>
|
|
public int SoldReward { get; private set; }
|
|
/// <summary>
|
|
/// 售卖奖励浮动
|
|
/// </summary>
|
|
public float SoldRewardRand { get; private set; }
|
|
/// <summary>
|
|
/// 成熟额外奖励
|
|
/// </summary>
|
|
public float GrowthExtraSoldReward { get; private set; }
|
|
/// <summary>
|
|
/// 变异概率
|
|
/// </summary>
|
|
public float MutantProb { get; private set; }
|
|
/// <summary>
|
|
/// 变异后额外奖励
|
|
/// </summary>
|
|
public float MutantExtraSoldReward { get; private set; }
|
|
/// <summary>
|
|
/// 变异后成熟额外奖励
|
|
/// </summary>
|
|
public float MutantGrowthExtraSoldReward { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼基础刺伤奖励
|
|
/// </summary>
|
|
public int AttackReward { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼基础抢走概率
|
|
/// </summary>
|
|
public float StealProb { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼抢走额外收益
|
|
/// </summary>
|
|
public float StealExtraReward { get; private set; }
|
|
/// <summary>
|
|
/// 刺伤变异鱼奖励
|
|
/// </summary>
|
|
public float AttackMutantExtraReward { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼变异鱼抢走概率
|
|
/// </summary>
|
|
public float StealMutantProb { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼变异鱼抢走额外收益
|
|
/// </summary>
|
|
public float StealMutantExtraReward { get; private set; }
|
|
/// <summary>
|
|
/// 偷鱼奖励浮动
|
|
/// </summary>
|
|
public float StealRewardRand { get; private set; }
|
|
/// <summary>
|
|
/// 恢复时间
|
|
/// </summary>
|
|
public System.Collections.Generic.List<float> RecoveryTime { get; private set; }
|
|
/// <summary>
|
|
/// 鱼塘主的鱼被抢走的概率
|
|
/// </summary>
|
|
public float RealStealProb { get; private set; }
|
|
|
|
public const int __ID__ = 1124687075;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void Resolve(Dictionary<string, object> _tables)
|
|
{
|
|
PostResolve();
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> translator)
|
|
{
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "ID:" + ID + ","
|
|
+ "GrowthTime:" + Bright.Common.StringUtil.CollectionToString(GrowthTime) + ","
|
|
+ "SoldReward:" + SoldReward + ","
|
|
+ "SoldRewardRand:" + SoldRewardRand + ","
|
|
+ "GrowthExtraSoldReward:" + GrowthExtraSoldReward + ","
|
|
+ "MutantProb:" + MutantProb + ","
|
|
+ "MutantExtraSoldReward:" + MutantExtraSoldReward + ","
|
|
+ "MutantGrowthExtraSoldReward:" + MutantGrowthExtraSoldReward + ","
|
|
+ "AttackReward:" + AttackReward + ","
|
|
+ "StealProb:" + StealProb + ","
|
|
+ "StealExtraReward:" + StealExtraReward + ","
|
|
+ "AttackMutantExtraReward:" + AttackMutantExtraReward + ","
|
|
+ "StealMutantProb:" + StealMutantProb + ","
|
|
+ "StealMutantExtraReward:" + StealMutantExtraReward + ","
|
|
+ "StealRewardRand:" + StealRewardRand + ","
|
|
+ "RecoveryTime:" + Bright.Common.StringUtil.CollectionToString(RecoveryTime) + ","
|
|
+ "RealStealProb:" + RealStealProb + ","
|
|
+ "}";
|
|
}
|
|
|
|
partial void PostInit();
|
|
partial void PostResolve();
|
|
}
|
|
}
|