//------------------------------------------------------------------------------ // // 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 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(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); } /// /// 威胁等级ID /// public readonly int Id; /// /// 显示名 /// public readonly string Name; /// /// 最大正面视野距离,千分之一Unity单位 /// public readonly int MaxViewDistanceMilli; /// /// 脱离视野后每秒降低警惕值 /// public readonly int AlertDecayPerSecondMilli; /// /// 由近到远的警惕增长距离段 /// public readonly System.Collections.Generic.List 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) + "," + "}"; } } }