Files
Fishing2/Assets/Scripts/Generate/Config/BobberConfig.cs
2025-10-29 22:41:47 +08:00

85 lines
2.0 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 NBC.Serialize;
namespace NBF
{
[ProtoContract]
public sealed partial class BobberConfig : ASerialize, IProto, IConfigTable
{
[ProtoMember(1)]
public uint Id { get; set; } // Id
[ProtoMember(2)]
public uint Displacement { get; set; } // 位移
[ProtoMember(3)]
public uint NightLight { get; set; } // 是否夜光
[ProtoIgnore]
public uint Key => Id;
#region Static
private static ConfigContext<BobberConfig> Context => ConfigTableHelper.Table<BobberConfig>();
public static BobberConfig Get(uint key)
{
return Context.Get(key);
}
public static BobberConfig Get(Predicate<BobberConfig> match)
{
return Context.Get(match);
}
public static BobberConfig Fist()
{
return Context.Fist();
}
public static BobberConfig Last()
{
return Context.Last();
}
public static BobberConfig Fist(Predicate<BobberConfig> match)
{
return Context.Fist(match);
}
public static BobberConfig Last(Predicate<BobberConfig> match)
{
return Context.Last(match);
}
public static int Count()
{
return Context.Count();
}
public static int Count(Func<BobberConfig, bool> predicate)
{
return Context.Count(predicate);
}
public static List<BobberConfig> GetList()
{
return Context.GetList();
}
public static List<BobberConfig> GetList(Predicate<BobberConfig> match)
{
return Context.GetList(match);
}
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
{
ConfigTableHelper.ParseLine<BobberConfig>(arr);
}
#endregion
}
}