- 引入 UnityGameFramework
- 使用 Luban 替代原来的 UGF 的数据表
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Luban;
|
||||
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
{
|
||||
public EnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
Name = _buf.ReadString();
|
||||
MaxHp = _buf.ReadInt();
|
||||
MaxMp = _buf.ReadInt();
|
||||
Atk = _buf.ReadInt();
|
||||
Mat = _buf.ReadInt();
|
||||
Speed = _buf.ReadInt();
|
||||
ThreatLevelId = _buf.ReadInt();
|
||||
AiType = (EnemyAiType)_buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);ActionIds = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); ActionIds.Add(_e0);}}
|
||||
DropTableId = _buf.ReadInt();
|
||||
}
|
||||
|
||||
public static EnemyConfig DeserializeEnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
return new EnemyConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 敌人ID
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
/// <summary>
|
||||
/// 原型名
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
/// <summary>
|
||||
/// HP上限
|
||||
/// </summary>
|
||||
public readonly int MaxHp;
|
||||
/// <summary>
|
||||
/// MP上限
|
||||
/// </summary>
|
||||
public readonly int MaxMp;
|
||||
/// <summary>
|
||||
/// 攻击力
|
||||
/// </summary>
|
||||
public readonly int Atk;
|
||||
/// <summary>
|
||||
/// 魔力
|
||||
/// </summary>
|
||||
public readonly int Mat;
|
||||
/// <summary>
|
||||
/// 速度
|
||||
/// </summary>
|
||||
public readonly int Speed;
|
||||
/// <summary>
|
||||
/// 威胁等级ID
|
||||
/// </summary>
|
||||
public readonly int ThreatLevelId;
|
||||
/// <summary>
|
||||
/// AI行为
|
||||
/// </summary>
|
||||
public readonly EnemyAiType AiType;
|
||||
/// <summary>
|
||||
/// 可随机选择的行动ID
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.List<int> ActionIds;
|
||||
/// <summary>
|
||||
/// 独立掉落表ID
|
||||
/// </summary>
|
||||
public readonly int DropTableId;
|
||||
|
||||
public const int __ID__ = 1284055242;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "maxHp:" + MaxHp + ","
|
||||
+ "maxMp:" + MaxMp + ","
|
||||
+ "atk:" + Atk + ","
|
||||
+ "mat:" + Mat + ","
|
||||
+ "speed:" + Speed + ","
|
||||
+ "threatLevelId:" + ThreatLevelId + ","
|
||||
+ "aiType:" + AiType + ","
|
||||
+ "actionIds:" + Luban.StringUtil.CollectionToString(ActionIds) + ","
|
||||
+ "dropTableId:" + DropTableId + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user