//------------------------------------------------------------------------------
// <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 SingleCreateEnemyConfig :  Bright.Config.BeanBase 
{
    public SingleCreateEnemyConfig(JSONNode _json) 
    {
        { if(!_json["ID"].IsNumber) { throw new SerializationException(); }  ID = _json["ID"]; }
        { if(!_json["EnemyID"].IsNumber) { throw new SerializationException(); }  EnemyID = _json["EnemyID"]; }
        { if(!_json["Count"].IsNumber) { throw new SerializationException(); }  Count = _json["Count"]; }
        { if(!_json["Time"].IsNumber) { throw new SerializationException(); }  Time = _json["Time"]; }
        { if(!_json["TimeInterval"].IsNumber) { throw new SerializationException(); }  TimeInterval = _json["TimeInterval"]; }
        { var __json0 = _json["Position"]; if(!__json0.IsArray) { throw new SerializationException(); } Position = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0;  { if(!__e0.IsNumber) { throw new SerializationException(); }  __v0 = __e0; }  Position.Add(__v0); }   }
        PostInit();
    }

    public SingleCreateEnemyConfig(int ID, int EnemyID, int Count, float Time, float TimeInterval, System.Collections.Generic.List<float> Position ) 
    {
        this.ID = ID;
        this.EnemyID = EnemyID;
        this.Count = Count;
        this.Time = Time;
        this.TimeInterval = TimeInterval;
        this.Position = Position;
        PostInit();
    }

    public static SingleCreateEnemyConfig DeserializeSingleCreateEnemyConfig(JSONNode _json)
    {
        return new SingleCreateEnemyConfig(_json);
    }

    /// <summary>
    /// 出怪批次
    /// </summary>
    public int ID { get; private set; }
    /// <summary>
    /// 怪物ID
    /// </summary>
    public int EnemyID { get; private set; }
    /// <summary>
    /// 怪物数量
    /// </summary>
    public int Count { get; private set; }
    /// <summary>
    /// 出怪时间
    /// </summary>
    public float Time { get; private set; }
    /// <summary>
    /// 出怪时间间隔
    /// </summary>
    public float TimeInterval { get; private set; }
    /// <summary>
    /// 出怪位置
    /// </summary>
    public System.Collections.Generic.List<float> Position { get; private set; }

    public const int __ID__ = 691467974;
    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 + ","
        + "EnemyID:" + EnemyID + ","
        + "Count:" + Count + ","
        + "Time:" + Time + ","
        + "TimeInterval:" + TimeInterval + ","
        + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
        + "}";
    }
    
    partial void PostInit();
    partial void PostResolve();
}
}
