//------------------------------------------------------------------------------
//
// 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 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(__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(__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 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 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);
}
///
/// 编号
///
public int ID { get; private set; }
///
/// 成长时间
///
public System.Collections.Generic.List GrowthTime { get; private set; }
///
/// 售卖奖励
///
public int SoldReward { get; private set; }
///
/// 售卖奖励浮动
///
public float SoldRewardRand { get; private set; }
///
/// 成熟额外奖励
///
public float GrowthExtraSoldReward { get; private set; }
///
/// 变异概率
///
public float MutantProb { get; private set; }
///
/// 变异后额外奖励
///
public float MutantExtraSoldReward { get; private set; }
///
/// 变异后成熟额外奖励
///
public float MutantGrowthExtraSoldReward { get; private set; }
///
/// 偷鱼基础刺伤奖励
///
public int AttackReward { get; private set; }
///
/// 偷鱼基础抢走概率
///
public float StealProb { get; private set; }
///
/// 偷鱼抢走额外收益
///
public float StealExtraReward { get; private set; }
///
/// 刺伤变异鱼奖励
///
public float AttackMutantExtraReward { get; private set; }
///
/// 偷鱼变异鱼抢走概率
///
public float StealMutantProb { get; private set; }
///
/// 偷鱼变异鱼抢走额外收益
///
public float StealMutantExtraReward { get; private set; }
///
/// 偷鱼奖励浮动
///
public float StealRewardRand { get; private set; }
///
/// 恢复时间
///
public System.Collections.Generic.List RecoveryTime { get; private set; }
///
/// 鱼塘主的鱼被抢走的概率
///
public float RealStealProb { get; private set; }
public const int __ID__ = 1124687075;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func 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();
}
}