模型预览功能
This commit is contained in:
@@ -17,8 +17,6 @@ namespace NBF
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public uint ItemId { get; set; } // 物品Id
|
||||
[ProtoMember(3)]
|
||||
public int Amount { get; set; } // 数量
|
||||
[ProtoIgnore]
|
||||
public uint Key => Id;
|
||||
|
||||
@@ -13,20 +13,32 @@ namespace NBF
|
||||
[ProtoContract]
|
||||
public sealed partial class ItemConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
[ProtoMember(1)] public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)] public string Model { get; set; } // 模型
|
||||
[ProtoMember(3)] public uint Type { get; set; } // 类型
|
||||
[ProtoMember(4)] public uint Quality { get; set; } // 品质
|
||||
[ProtoMember(5)] public uint Brand { get; set; } // 品牌
|
||||
[ProtoMember(6)] public uint Weight { get; set; } // 重量(克)
|
||||
[ProtoMember(7)] public uint Length { get; set; } // 长度(毫米)
|
||||
[ProtoMember(8)] public uint Max { get; set; } // 最大堆叠数量
|
||||
[ProtoMember(9)] public uint AutoUse { get; set; } // 获得自动使用
|
||||
[ProtoMember(10)] public uint Deal { get; set; } // 交易类型
|
||||
[ProtoIgnore] public uint Key => Id;
|
||||
|
||||
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Model { get; set; } // 模型
|
||||
[ProtoMember(3)]
|
||||
public uint Type { get; set; } // 类型
|
||||
[ProtoMember(4)]
|
||||
public uint Quality { get; set; } // 品质
|
||||
[ProtoMember(5)]
|
||||
public uint Brand { get; set; } // 品牌
|
||||
[ProtoMember(6)]
|
||||
public uint Weight { get; set; } // 重量(克)
|
||||
[ProtoMember(7)]
|
||||
public uint Length { get; set; } // 长度(毫米)
|
||||
[ProtoMember(8)]
|
||||
public uint Max { get; set; } // 最大堆叠数量
|
||||
[ProtoMember(9)]
|
||||
public uint AutoUse { get; set; } // 获得自动使用
|
||||
[ProtoMember(10)]
|
||||
public uint Deal { get; set; } // 交易类型
|
||||
[ProtoIgnore]
|
||||
public uint Key => Id;
|
||||
|
||||
#region Static
|
||||
|
||||
|
||||
private static ConfigContext<ItemConfig> Context => ConfigTableHelper.Table<ItemConfig>();
|
||||
|
||||
public static ItemConfig Get(uint key)
|
||||
@@ -38,7 +50,7 @@ namespace NBF
|
||||
{
|
||||
return Context.Get(match);
|
||||
}
|
||||
|
||||
|
||||
public static ItemConfig Fist()
|
||||
{
|
||||
return Context.Fist();
|
||||
@@ -58,7 +70,7 @@ namespace NBF
|
||||
{
|
||||
return Context.Last(match);
|
||||
}
|
||||
|
||||
|
||||
public static int Count()
|
||||
{
|
||||
return Context.Count();
|
||||
@@ -78,12 +90,10 @@ namespace NBF
|
||||
{
|
||||
return Context.GetList(match);
|
||||
}
|
||||
|
||||
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
||||
{
|
||||
ConfigTableHelper.ParseLine<ItemConfig>(arr);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
85
Assets/Scripts/Generate/Config/RodRingConfig.cs
Normal file
85
Assets/Scripts/Generate/Config/RodRingConfig.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
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 RodRingConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Model { get; set; } // 模型
|
||||
[ProtoMember(3)]
|
||||
public uint Strength { get; set; } // 强度
|
||||
[ProtoIgnore]
|
||||
public uint Key => Id;
|
||||
|
||||
#region Static
|
||||
|
||||
private static ConfigContext<RodRingConfig> Context => ConfigTableHelper.Table<RodRingConfig>();
|
||||
|
||||
public static RodRingConfig Get(uint key)
|
||||
{
|
||||
return Context.Get(key);
|
||||
}
|
||||
|
||||
public static RodRingConfig Get(Predicate<RodRingConfig> match)
|
||||
{
|
||||
return Context.Get(match);
|
||||
}
|
||||
|
||||
public static RodRingConfig Fist()
|
||||
{
|
||||
return Context.Fist();
|
||||
}
|
||||
|
||||
public static RodRingConfig Last()
|
||||
{
|
||||
return Context.Last();
|
||||
}
|
||||
|
||||
public static RodRingConfig Fist(Predicate<RodRingConfig> match)
|
||||
{
|
||||
return Context.Fist(match);
|
||||
}
|
||||
|
||||
public static RodRingConfig Last(Predicate<RodRingConfig> match)
|
||||
{
|
||||
return Context.Last(match);
|
||||
}
|
||||
|
||||
public static int Count()
|
||||
{
|
||||
return Context.Count();
|
||||
}
|
||||
|
||||
public static int Count(Func<RodRingConfig, bool> predicate)
|
||||
{
|
||||
return Context.Count(predicate);
|
||||
}
|
||||
|
||||
public static List<RodRingConfig> GetList()
|
||||
{
|
||||
return Context.GetList();
|
||||
}
|
||||
|
||||
public static List<RodRingConfig> GetList(Predicate<RodRingConfig> match)
|
||||
{
|
||||
return Context.GetList(match);
|
||||
}
|
||||
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
||||
{
|
||||
ConfigTableHelper.ParseLine<RodRingConfig>(arr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Generate/Config/RodRingConfig.cs.meta
Normal file
2
Assets/Scripts/Generate/Config/RodRingConfig.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e47768c4795d2d142a071bcc4edc6767
|
||||
Reference in New Issue
Block a user