77 lines
2.3 KiB
C#
77 lines
2.3 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 Luban;
|
|
|
|
|
|
namespace SepCore.Definition
|
|
{
|
|
public sealed partial class ThreatLevelConfig : Luban.BeanBase
|
|
{
|
|
public ThreatLevelConfig(ByteBuf _buf)
|
|
{
|
|
Id = _buf.ReadInt();
|
|
Name = _buf.ReadString();
|
|
MaxViewDistanceMilli = _buf.ReadInt();
|
|
AlertDecayPerSecondMilli = _buf.ReadInt();
|
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);DistanceBands = new System.Collections.Generic.List<AlertDistanceBand>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { AlertDistanceBand _e0; _e0 = AlertDistanceBand.DeserializeAlertDistanceBand(_buf); DistanceBands.Add(_e0);}}
|
|
}
|
|
|
|
public static ThreatLevelConfig DeserializeThreatLevelConfig(ByteBuf _buf)
|
|
{
|
|
return new ThreatLevelConfig(_buf);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 威胁等级ID
|
|
/// </summary>
|
|
public readonly int Id;
|
|
/// <summary>
|
|
/// 显示名
|
|
/// </summary>
|
|
public readonly string Name;
|
|
/// <summary>
|
|
/// 最大正面视野距离,千分之一Unity单位
|
|
/// </summary>
|
|
public readonly int MaxViewDistanceMilli;
|
|
/// <summary>
|
|
/// 脱离视野后每秒降低警惕值
|
|
/// </summary>
|
|
public readonly int AlertDecayPerSecondMilli;
|
|
/// <summary>
|
|
/// 由近到远的警惕增长距离段
|
|
/// </summary>
|
|
public readonly System.Collections.Generic.List<AlertDistanceBand> DistanceBands;
|
|
|
|
public const int __ID__ = -916505268;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void ResolveRef(Tables tables)
|
|
{
|
|
|
|
|
|
|
|
|
|
foreach (var _e in DistanceBands) { _e?.ResolveRef(tables); }
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "id:" + Id + ","
|
|
+ "name:" + Name + ","
|
|
+ "maxViewDistanceMilli:" + MaxViewDistanceMilli + ","
|
|
+ "alertDecayPerSecondMilli:" + AlertDecayPerSecondMilli + ","
|
|
+ "distanceBands:" + Luban.StringUtil.CollectionToString(DistanceBands) + ","
|
|
+ "}";
|
|
}
|
|
}
|
|
|
|
}
|