//------------------------------------------------------------------------------
// <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 SingleEnemyConfig :  Bright.Config.BeanBase 
{
    public SingleEnemyConfig(JSONNode _json) 
    {
        { if(!_json["ID"].IsNumber) { throw new SerializationException(); }  ID = _json["ID"]; }
        { if(!_json["EnemyPrefab"].IsString) { throw new SerializationException(); }  EnemyPrefab = _json["EnemyPrefab"]; }
        { if(!_json["HP"].IsNumber) { throw new SerializationException(); }  HP = _json["HP"]; }
        { if(!_json["Damage"].IsNumber) { throw new SerializationException(); }  Damage = _json["Damage"]; }
        PostInit();
    }

    public SingleEnemyConfig(int ID, string EnemyPrefab, int HP, int Damage ) 
    {
        this.ID = ID;
        this.EnemyPrefab = EnemyPrefab;
        this.HP = HP;
        this.Damage = Damage;
        PostInit();
    }

    public static SingleEnemyConfig DeserializeSingleEnemyConfig(JSONNode _json)
    {
        return new SingleEnemyConfig(_json);
    }

    /// <summary>
    /// 出怪批次
    /// </summary>
    public int ID { get; private set; }
    /// <summary>
    /// 怪物Prefab
    /// </summary>
    public string EnemyPrefab { get; private set; }
    /// <summary>
    /// 怪物血量
    /// </summary>
    public int HP { get; private set; }
    /// <summary>
    /// 攻击力
    /// </summary>
    public int Damage { get; private set; }

    public const int __ID__ = 491839330;
    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 + ","
        + "EnemyPrefab:" + EnemyPrefab + ","
        + "HP:" + HP + ","
        + "Damage:" + Damage + ","
        + "}";
    }
    
    partial void PostInit();
    partial void PostResolve();
}
}
