Files
Fishing2/Assets/Scripts/Generate/Config/RodConfig.cs
2025-11-12 17:24:02 +08:00

91 lines
2.2 KiB
C#

using System;
using ProtoBuf;
using Fantasy;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using System.Collections.Concurrent;
using NBC;
using Fantasy.Serialize;
namespace NBF
{
[ProtoContract]
public sealed partial class RodConfig : ASerialize, IConfigTable
{
[ProtoMember(1)]
public uint Id { get; set; } // Id
[ProtoMember(2)]
public uint RodType { get; set; } // 鱼竿类型
[ProtoMember(3)]
public uint Ring { get; set; } // 导线圈
[ProtoMember(4)]
public uint Strength { get; set; } // 强度
[ProtoMember(5)]
public uint MaxRange { get; set; } // 最大范围
[ProtoMember(6)]
public uint ConstructionType { get; set; } // 结构类型
[ProtoIgnore]
public uint Key => Id;
#region Static
private static ConfigContext<RodConfig> Context => ConfigTableHelper.Table<RodConfig>();
public static RodConfig Get(uint key)
{
return Context.Get(key);
}
public static RodConfig Get(Predicate<RodConfig> match)
{
return Context.Get(match);
}
public static RodConfig Fist()
{
return Context.Fist();
}
public static RodConfig Last()
{
return Context.Last();
}
public static RodConfig Fist(Predicate<RodConfig> match)
{
return Context.Fist(match);
}
public static RodConfig Last(Predicate<RodConfig> match)
{
return Context.Last(match);
}
public static int Count()
{
return Context.Count();
}
public static int Count(Func<RodConfig, bool> predicate)
{
return Context.Count(predicate);
}
public static List<RodConfig> GetList()
{
return Context.GetList();
}
public static List<RodConfig> GetList(Predicate<RodConfig> match)
{
return Context.GetList(match);
}
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
{
ConfigTableHelper.ParseLine<RodConfig>(arr);
}
#endregion
}
}