diff --git a/Assets/Resources/Fgui/Main/Main_fui.bytes b/Assets/Resources/Fgui/Main/Main_fui.bytes index a37870058..906b17e39 100644 Binary files a/Assets/Resources/Fgui/Main/Main_fui.bytes and b/Assets/Resources/Fgui/Main/Main_fui.bytes differ diff --git a/Assets/Resources/config/configs.json b/Assets/Resources/config/configs.json index 298f81c13..fbec79957 100644 --- a/Assets/Resources/config/configs.json +++ b/Assets/Resources/config/configs.json @@ -1,289 +1,444 @@ { - "WeightConfig": [ - { - "Id": 100001, - "Model": "Weights/Weight2_5g", - "Icon": "", - "Type": 0, - "Weight": 3 - } - ], - "RingConfig": [ - { - "Id": 120001, - "Model": "rod_rings/rumoi/rumoi_oxiline_spin", - "Icon": "" - }, - { - "Id": 120002, - "Model": "rod_rings/smt/smt_pure_ceramic_bolo", - "Icon": "" - } - ], "LureConfig": [ { "Id": 80001, - "Model": "lures/express_fishing/crankbaits_1/775/crankbaits_775", - "Icon": "", "Hook": [ 700102 ], - "EfficacyBase": 50, - "Length": 0, - "Weight": 250 + "EfficacyBase": 50 }, { "Id": 80002, - "Model": "lures/express_fishing/poppers_1/poppers_590/poppers_590", - "Icon": "", "Hook": [ 700102 ], - "EfficacyBase": 50, - "Length": 0, - "Weight": 120 + "EfficacyBase": 50 }, { "Id": 80003, - "Model": "lures/express_fishing/softplastic/ef_supergrab_6/softplastic_g_1622", - "Icon": "", "Hook": [ 0 ], - "EfficacyBase": 50, - "Length": 0, - "Weight": 120 + "EfficacyBase": 50 }, { "Id": 80004, - "Model": "lures/express_fishing/softplastic/ef_superminnow_6/softplastic_m_1634", - "Icon": "", "Hook": [ 0 ], - "EfficacyBase": 50, - "Length": 0, - "Weight": 120 + "EfficacyBase": 50 } ], "ItemConfig": [ { - "Id": 20001, - "Model": "", - "Icon": "", + "Id": 30001, + "Model": "rods/syberia/tele_10037/tele_10037_t13", "Type": 1, + "Quality": 1, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20002, - "Model": "", - "Icon": "", + "Id": 30002, + "Model": "rods/syberia/bolo_10021/bolo_10021_LB400", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20003, - "Model": "", - "Icon": "", + "Id": 30003, + "Model": "rods/syberia/spin_10034/spin_10034_S60H", "Type": 0, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20004, - "Model": "", - "Icon": "", + "Id": 30004, + "Model": "rods/syberia/spin_10034/spin_10034_S60H", "Type": 0, + "Quality": 4, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20005, - "Model": "", - "Icon": "", + "Id": 30005, + "Model": "rods/syberia/spin_10034/spin_10034_S60H", "Type": 0, + "Quality": 5, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20006, - "Model": "", - "Icon": "", + "Id": 30006, + "Model": "rods/syberia/spin_10034/spin_10034_S60H", "Type": 0, + "Quality": 4, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20007, - "Model": "", - "Icon": "", + "Id": 30007, + "Model": "rods/syberia/spin_10034/spin_10034_S60H", "Type": 0, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20008, - "Model": "", - "Icon": "", + "Id": 40001, + "Model": "reels/syberia/spin_5002/spin_5002", "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20009, - "Model": "", - "Icon": "", + "Id": 40002, + "Model": "reels/syberia/spin_5036/spin_5036", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20010, - "Model": "", - "Icon": "", + "Id": 50001, + "Model": "bobbers/expressfishing/bob_25003/bob_25003", "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20011, - "Model": "", - "Icon": "", + "Id": 50002, + "Model": "bobbers/expressfishing/bob_25162_25163/bob_25162", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20012, - "Model": "", - "Icon": "", + "Id": 50003, + "Model": "bobbers/expressfishing/bob_25166_25167/bob_25166", "Type": 0, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20013, - "Model": "", - "Icon": "", + "Id": 50004, + "Model": "bobbers/expressfishing/bob_25001/bob_25001", "Type": 0, + "Quality": 4, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20014, - "Model": "", - "Icon": "", + "Id": 60001, + "Model": "Lines/UFE Mono/UFE monoClear", "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20015, - "Model": "", - "Icon": "", + "Id": 60002, + "Model": "rods/syberia/bolo_10021/bolo_10021_LB400", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20016, - "Model": "", - "Icon": "", + "Id": 70001, + "Model": "baits/worm_01/worm_01", "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20017, - "Model": "", - "Icon": "", + "Id": 70002, + "Model": "baits/fly/fly", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20018, - "Model": "", - "Icon": "", + "Id": 70003, + "Model": "baits/black_leech/black_leech", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20019, - "Model": "", - "Icon": "", + "Id": 70004, + "Model": "baits/bread/bread", "Type": 0, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20020, - "Model": "", - "Icon": "", + "Id": 80001, + "Model": "lures/express_fishing/crankbaits_1/775/crankbaits_775", "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20021, - "Model": "", - "Icon": "", + "Id": 80002, + "Model": "lures/express_fishing/poppers_1/poppers_590/poppers_590", "Type": 0, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 }, { - "Id": 20022, - "Model": "", - "Icon": "", + "Id": 80003, + "Model": "lures/express_fishing/softplastic/ef_supergrab_6/softplastic_g_1622", "Type": 0, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, "Max": 0, - "AutoUse": 0 + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 80004, + "Model": "lures/express_fishing/softplastic/ef_superminnow_6/softplastic_m_1634", + "Type": 0, + "Quality": 4, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 90001, + "Model": "hooks/alliance/c_hook_20789_20794/c_hook_20789", + "Type": 1, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 90002, + "Model": "hooks/berserk_hooks/triple_20569_20577/triple_20569", + "Type": 1, + "Quality": 2, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 90003, + "Model": "hooks/berserk_hooks/triple_20569_20577/triple_20569", + "Type": 1, + "Quality": 3, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 90004, + "Model": "hooks/berserk_hooks/triple_20569_20577/triple_20569", + "Type": 1, + "Quality": 4, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 90005, + "Model": "hooks/berserk_hooks/triple_20569_20577/triple_20569", + "Type": 1, + "Quality": 5, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 100001, + "Model": "Weights/Weight2_5g", + "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 110001, + "Model": "Feeders/Feeder 1/FeedTrash 1", + "Type": 0, + "Quality": 1, + "Brand": 1, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 120001, + "Model": "rod_rings/rumoi/rumoi_oxiline_spin", + "Type": 0, + "Quality": 1, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 + }, + { + "Id": 120002, + "Model": "rod_rings/smt/smt_pure_ceramic_bolo", + "Type": 0, + "Quality": 1, + "Brand": 0, + "Weight": 0, + "Length": 0, + "Max": 0, + "AutoUse": 0, + "Deal": 0 } ], "ReelConfig": [ { "Id": 40001, - "Model": "reels/syberia/spin_5002/spin_5002", - "Icon": "", - "Type": 0, "GearRatio": [ "7" ], - "Size": 250, "Strength": 40 }, { "Id": 40002, - "Model": "reels/syberia/spin_5036/spin_5036", - "Icon": "", - "Type": 0, "GearRatio": [ "5" ], - "Size": 120, "Strength": 40 } ], "LineConfig": [ { "Id": 60001, - "Model": "Lines/UFE Mono/UFE monoClear", - "Icon": "", - "Type": 0, - "Length": 7, "Strength": 40, "Size": 1 }, { "Id": 60002, - "Model": "rods/syberia/bolo_10021/bolo_10021_LB400", - "Icon": "", - "Type": 0, - "Length": 5, "Strength": 40, "Size": 1 } @@ -291,56 +446,71 @@ "HookConfig": [ { "Id": 90001, - "Model": "hooks/alliance/c_hook_20789_20794/c_hook_20789", - "Icon": "", - "Type": 1, - "Zadzior": 1, - "Length": 0, - "Weight": 1 + "Zadzior": 1 }, { "Id": 90002, - "Model": "hooks/berserk_hooks/triple_20569_20577/triple_20569", - "Icon": "", - "Type": 1, - "Zadzior": 1, - "Length": 0, - "Weight": 1 + "Zadzior": 1 + }, + { + "Id": 90003, + "Zadzior": 1 + }, + { + "Id": 90004, + "Zadzior": 1 + }, + { + "Id": 90005, + "Zadzior": 1 } ], "RodConfig": [ { "Id": 30001, - "Model": "rods/syberia/tele_10037/tele_10037_t13", - "Icon": "", - "Type": 1, "Ring": 0, - "Length": 7, - "Weight": 250, "Strength": 40, "MaxRange": 67, "ConstructionType": 0 }, { "Id": 30002, - "Model": "rods/syberia/bolo_10021/bolo_10021_LB400", - "Icon": "", - "Type": 0, "Ring": 1100002, - "Length": 5, - "Weight": 120, "Strength": 40, "MaxRange": 30, "ConstructionType": 0 }, { "Id": 30003, - "Model": "rods/syberia/spin_10034/spin_10034_S60H", - "Icon": "", - "Type": 0, "Ring": 1100001, - "Length": 5, - "Weight": 120, + "Strength": 40, + "MaxRange": 30, + "ConstructionType": 0 + }, + { + "Id": 30004, + "Ring": 1100001, + "Strength": 40, + "MaxRange": 30, + "ConstructionType": 0 + }, + { + "Id": 30005, + "Ring": 1100001, + "Strength": 40, + "MaxRange": 30, + "ConstructionType": 0 + }, + { + "Id": 30006, + "Ring": 1100001, + "Strength": 40, + "MaxRange": 30, + "ConstructionType": 0 + }, + { + "Id": 30007, + "Ring": 1100001, "Strength": 40, "MaxRange": 30, "ConstructionType": 0 @@ -496,37 +666,21 @@ "BobberConfig": [ { "Id": 50001, - "Model": "bobbers/expressfishing/bob_25003/bob_25003", - "Icon": "", - "Type": 2, - "Weight": 1, "Displacement": 40, "NightLight": 0 }, { "Id": 50002, - "Model": "bobbers/expressfishing/bob_25162_25163/bob_25162", - "Icon": "", - "Type": 0, - "Weight": 1, "Displacement": 40, "NightLight": 0 }, { "Id": 50003, - "Model": "bobbers/expressfishing/bob_25166_25167/bob_25166", - "Icon": "", - "Type": 0, - "Weight": 1, "Displacement": 40, "NightLight": 0 }, { "Id": 50004, - "Model": "bobbers/expressfishing/bob_25001/bob_25001", - "Icon": "", - "Type": 0, - "Weight": 1, "Displacement": 40, "NightLight": 0 } @@ -534,9 +688,6 @@ "FeederConfig": [ { "Id": 110001, - "Model": "Feeders/Feeder 1/FeedTrash 1", - "Icon": "", - "Type": 0, "Capacity": 100, "Weight": 5 } @@ -544,11 +695,7 @@ "BaitConfig": [ { "Id": 70001, - "Model": "baits/worm_01/worm_01", - "Icon": "", "EfficacyBase": 15, - "Length": 0, - "Weight": 250, "Arr": [ 250, 1, @@ -564,11 +711,7 @@ }, { "Id": 70002, - "Model": "baits/fly/fly", - "Icon": "", "EfficacyBase": 15, - "Length": 0, - "Weight": 120, "Arr": [ 120, 4, @@ -582,11 +725,7 @@ }, { "Id": 70003, - "Model": "baits/black_leech/black_leech", - "Icon": "", "EfficacyBase": 15, - "Length": 0, - "Weight": 120, "Arr": [ 120 ], @@ -596,11 +735,7 @@ }, { "Id": 70004, - "Model": "baits/bread/bread", - "Icon": "", "EfficacyBase": 15, - "Length": 0, - "Weight": 120, "Arr": [ 120 ], diff --git a/Assets/Scripts/Common/Data.meta b/Assets/Scripts/Common/Data.meta new file mode 100644 index 000000000..749da6ca5 --- /dev/null +++ b/Assets/Scripts/Common/Data.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fc83e1d6083241c08d36a271df033aa6 +timeCreated: 1761057848 \ No newline at end of file diff --git a/Assets/Scripts/Common/Data/ItemInfo.cs b/Assets/Scripts/Common/Data/ItemInfo.cs new file mode 100644 index 000000000..fa14f4a3c --- /dev/null +++ b/Assets/Scripts/Common/Data/ItemInfo.cs @@ -0,0 +1,14 @@ +using NBF; + +namespace NBC +{ + public partial class ItemInfo + { + private ItemConfig _config; + + public ItemConfig Config + { + get { return _config ??= ItemConfig.Get(ConfigId); } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Common/Data/ItemInfo.cs.meta b/Assets/Scripts/Common/Data/ItemInfo.cs.meta new file mode 100644 index 000000000..6d3453ab0 --- /dev/null +++ b/Assets/Scripts/Common/Data/ItemInfo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fdc07f3a841e4cba821c2ae2b82b2697 +timeCreated: 1761057852 \ No newline at end of file diff --git a/Assets/Scripts/Common/Extensions/GObjectExtensions.cs b/Assets/Scripts/Common/Extensions/GObjectExtensions.cs new file mode 100644 index 000000000..99d7b7131 --- /dev/null +++ b/Assets/Scripts/Common/Extensions/GObjectExtensions.cs @@ -0,0 +1,23 @@ +using FairyGUI; +using NBF.Utils; + +namespace NBF +{ + public static class GObjectExtensions + { + public static void SetQuality(this GImage image, uint quality) + { + image.color = ItemHelper.GetItemQualityColor(quality); + } + + public static void SetQuality(this GTextField image, uint quality) + { + image.strokeColor = ItemHelper.GetItemQualityColor(quality); + } + + public static void SetTitleQuality(this GButton com, uint quality) + { + com.GetTextField().strokeColor = ItemHelper.GetItemQualityColor(quality); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Common/Extensions/GObjectExtensions.cs.meta b/Assets/Scripts/Common/Extensions/GObjectExtensions.cs.meta new file mode 100644 index 000000000..e9296a471 --- /dev/null +++ b/Assets/Scripts/Common/Extensions/GObjectExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1e39c262c800477e8b6e353aa1d62383 +timeCreated: 1761058048 \ No newline at end of file diff --git a/Assets/Scripts/Common/Utils/ItemHelper.cs b/Assets/Scripts/Common/Utils/ItemHelper.cs index 5a11aeb49..93c5ba9b8 100644 --- a/Assets/Scripts/Common/Utils/ItemHelper.cs +++ b/Assets/Scripts/Common/Utils/ItemHelper.cs @@ -1,5 +1,6 @@ using FairyGUI; using NBC; +using UnityEngine; namespace NBF.Utils { @@ -35,5 +36,29 @@ namespace NBF.Utils { loader.icon = id.GetIcon(); } + + #region 品质相关 + + public static Color QualityColor0 = new Color(1, 1, 1, 0); + public static Color QualityColor1 = new Color(96 / 255f, 160 / 255f, 224 / 255f, 1); + public static Color QualityColor2 = new Color(0 / 255f, 138 / 255f, 255 / 255f, 1); + public static Color QualityColor3 = new Color(126 / 255f, 0 / 255f, 255 / 255f, 1); + public static Color QualityColor4 = new Color(220 / 255f, 50 / 255f, 50 / 255f, 1); + public static Color QualityColor5 = new Color(255 / 255f, 108 / 255f, 0 / 255f, 1); + + public static Color GetItemQualityColor(uint quality) + { + return quality switch + { + 1 => QualityColor1, + 2 => QualityColor2, + 3 => QualityColor3, + 4 => QualityColor4, + 5 => QualityColor5, + _ => QualityColor0 + }; + } + + #endregion } } \ No newline at end of file diff --git a/Assets/Scripts/Fishing2/Role/RoleBag.cs b/Assets/Scripts/Fishing2/Role/RoleBag.cs index 6ab45dc66..4e1756cf6 100644 --- a/Assets/Scripts/Fishing2/Role/RoleBag.cs +++ b/Assets/Scripts/Fishing2/Role/RoleBag.cs @@ -39,6 +39,11 @@ namespace NBF.Fishing2 dic[type].Add(item); } + foreach (var (key, list) in dic) + { + list.Sort((x, y) => (int)(y.Config.Quality - x.Config.Quality)); + } + return dic; } } diff --git a/Assets/Scripts/Generate/Config/BaitConfig.cs b/Assets/Scripts/Generate/Config/BaitConfig.cs index 267ec4312..a12132790 100644 --- a/Assets/Scripts/Generate/Config/BaitConfig.cs +++ b/Assets/Scripts/Generate/Config/BaitConfig.cs @@ -17,20 +17,10 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - - - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] public uint EfficacyBase { get; set; } // 吸引力 - [ProtoMember(5)] - public uint Length { get; set; } // 长度(毫米) - [ProtoMember(6)] - public uint Weight { get; set; } // 重量(克) - [ProtoMember(7)] + [ProtoMember(3)] public uint[] Arr { get; set; } = Array.Empty(); // 重量(克) - [ProtoMember(8)] + [ProtoMember(4)] public string[] ArrStr { get; set; } = Array.Empty(); // 重量(克) [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/BobberConfig.cs b/Assets/Scripts/Generate/Config/BobberConfig.cs index d83613d6b..c2050c3bc 100644 --- a/Assets/Scripts/Generate/Config/BobberConfig.cs +++ b/Assets/Scripts/Generate/Config/BobberConfig.cs @@ -17,16 +17,8 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] - public uint Weight { get; set; } // 重量(克) - [ProtoMember(6)] public uint Displacement { get; set; } // 位移 - [ProtoMember(7)] + [ProtoMember(3)] public uint NightLight { get; set; } // 是否夜光 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/FeederConfig.cs b/Assets/Scripts/Generate/Config/FeederConfig.cs index 43bf4e99c..dee8859bf 100644 --- a/Assets/Scripts/Generate/Config/FeederConfig.cs +++ b/Assets/Scripts/Generate/Config/FeederConfig.cs @@ -17,14 +17,8 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] public uint Capacity { get; set; } // 能力 - [ProtoMember(6)] + [ProtoMember(3)] public uint Weight { get; set; } // 重量(克) [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/HookConfig.cs b/Assets/Scripts/Generate/Config/HookConfig.cs index 66eab5102..d16cc2a9c 100644 --- a/Assets/Scripts/Generate/Config/HookConfig.cs +++ b/Assets/Scripts/Generate/Config/HookConfig.cs @@ -17,17 +17,7 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] - public uint Zadzior { get; set; } // 长钉 - [ProtoMember(6)] - public uint Length { get; set; } // 长度(毫米) - [ProtoMember(7)] - public uint Weight { get; set; } // 重量(克) + public uint Zadzior { get; set; } // 长钉 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/ItemConfig.cs b/Assets/Scripts/Generate/Config/ItemConfig.cs index af6928057..dde2d596e 100644 --- a/Assets/Scripts/Generate/Config/ItemConfig.cs +++ b/Assets/Scripts/Generate/Config/ItemConfig.cs @@ -19,13 +19,21 @@ namespace NBF [ProtoMember(2)] public string Model { get; set; } // 模型 [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] public uint Type { get; set; } // 类型 + [ProtoMember(4)] + public uint Quality { get; set; } // 品质 [ProtoMember(5)] - public uint Max { get; set; } // 最大堆叠数量 + public uint Brand { get; set; } // 品牌 [ProtoMember(6)] - public uint AutoUse { get; set; } // 获得自动使用 + 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; diff --git a/Assets/Scripts/Generate/Config/LineConfig.cs b/Assets/Scripts/Generate/Config/LineConfig.cs index 0c858c882..98944c8d8 100644 --- a/Assets/Scripts/Generate/Config/LineConfig.cs +++ b/Assets/Scripts/Generate/Config/LineConfig.cs @@ -17,16 +17,8 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] - public uint Length { get; set; } // 长度(毫米) - [ProtoMember(6)] public uint Strength { get; set; } // 强度 - [ProtoMember(7)] + [ProtoMember(3)] public uint Size { get; set; } // 尺寸 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/LureConfig.cs b/Assets/Scripts/Generate/Config/LureConfig.cs index aafb533a4..1d038a2c5 100644 --- a/Assets/Scripts/Generate/Config/LureConfig.cs +++ b/Assets/Scripts/Generate/Config/LureConfig.cs @@ -17,17 +17,9 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] public uint[] Hook { get; set; } = Array.Empty(); // 勾 - [ProtoMember(5)] - public uint EfficacyBase { get; set; } // 吸引力 - [ProtoMember(6)] - public uint Length { get; set; } // 长度(毫米) - [ProtoMember(7)] - public uint Weight { get; set; } // 重量(克) + [ProtoMember(3)] + public uint EfficacyBase { get; set; } // 吸引力 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/ReelConfig.cs b/Assets/Scripts/Generate/Config/ReelConfig.cs index 045b1d90f..f09576a76 100644 --- a/Assets/Scripts/Generate/Config/ReelConfig.cs +++ b/Assets/Scripts/Generate/Config/ReelConfig.cs @@ -17,16 +17,8 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] public float[] GearRatio { get; set; } = Array.Empty(); // 组件比 - [ProtoMember(6)] - public uint Size { get; set; } // 尺寸 - [ProtoMember(7)] + [ProtoMember(3)] public uint Strength { get; set; } // 强度 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Generate/Config/RodConfig.cs b/Assets/Scripts/Generate/Config/RodConfig.cs index 55481504b..d3931bc70 100644 --- a/Assets/Scripts/Generate/Config/RodConfig.cs +++ b/Assets/Scripts/Generate/Config/RodConfig.cs @@ -17,22 +17,12 @@ namespace NBF [ProtoMember(1)] public uint Id { get; set; } // Id [ProtoMember(2)] - public string Model { get; set; } // 模型 - [ProtoMember(3)] - public string Icon { get; set; } // 图标 - [ProtoMember(4)] - public uint Type { get; set; } // 类型 - [ProtoMember(5)] public uint Ring { get; set; } // 导线圈 - [ProtoMember(6)] - public uint Length { get; set; } // 长度(毫米) - [ProtoMember(7)] - public uint Weight { get; set; } // 重量(克) - [ProtoMember(8)] + [ProtoMember(3)] public uint Strength { get; set; } // 强度 - [ProtoMember(9)] + [ProtoMember(4)] public uint MaxRange { get; set; } // 最大范围 - [ProtoMember(10)] + [ProtoMember(5)] public uint ConstructionType { get; set; } // 结构类型 [ProtoIgnore] public uint Key => Id; diff --git a/Assets/Scripts/Init.cs b/Assets/Scripts/Init.cs index 3a961b903..f18f3c599 100644 --- a/Assets/Scripts/Init.cs +++ b/Assets/Scripts/Init.cs @@ -86,6 +86,7 @@ namespace NBF Binder.BindAll(); UIObjectFactory.SetLoaderExtension(typeof(XGLoader)); UIConst.UIPackRootUrl = UIDef.UIRoot; + UIConfig.verticalScrollBar = "ui://6hgkvlauoomej"; UIConfig.defaultFont = "AlibabaPuHuiTi-3-Medium"; App.UI.SetUILanguage(); UIConfig.modalLayerColor = new Color(0, 0, 0, 0.9f); diff --git a/Assets/Scripts/UI/Bag/BagItem.Designer.cs b/Assets/Scripts/UI/Bag/BagItem.Designer.cs index 03aa72b63..6a17e5e1c 100644 --- a/Assets/Scripts/UI/Bag/BagItem.Designer.cs +++ b/Assets/Scripts/UI/Bag/BagItem.Designer.cs @@ -12,14 +12,14 @@ namespace NBF public const string URL = "ui://hxr7rc7puq3a1h"; public GImage back; - public GImage ba; + public GImage Quality; public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); back = (GImage)GetChild("back"); - ba = (GImage)GetChild("ba"); + Quality = (GImage)GetChild("Quality"); OnInited(); UILanguage.TrySetComponentLanguage(this); } diff --git a/Assets/Scripts/UI/Bag/BagItem.cs b/Assets/Scripts/UI/Bag/BagItem.cs index 26715e6d3..bb877c314 100644 --- a/Assets/Scripts/UI/Bag/BagItem.cs +++ b/Assets/Scripts/UI/Bag/BagItem.cs @@ -9,14 +9,19 @@ namespace NBF { public partial class BagItem : GButton { + public ItemInfo ItemInfo; + private void OnInited() { } public virtual void SetData(ItemInfo itemInfo) { + ItemInfo = itemInfo; title = itemInfo.ConfigId.GetName(); this.SetIcon(itemInfo.ConfigId); + Quality.SetQuality(ItemInfo.Config.Quality); + this.SetTitleQuality(ItemInfo.Config.Quality); } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/BagPanel.cs b/Assets/Scripts/UI/Bag/BagPanel.cs index c29d53da6..404659f0c 100644 --- a/Assets/Scripts/UI/Bag/BagPanel.cs +++ b/Assets/Scripts/UI/Bag/BagPanel.cs @@ -59,8 +59,9 @@ namespace NBF private void OnClickItem(object item) { + if (item is not BagItem bagItem) return; // ItemDetailsPanel.s - ItemDetailsPanel.Show(); + ItemDetailsPanel.Show(bagItem.ItemInfo); } private void UseBottomMenu() diff --git a/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs new file mode 100644 index 000000000..8453386bc --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs @@ -0,0 +1,29 @@ +/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/ + + +using FairyGUI; +using FairyGUI.Utils; +using NBC; + +namespace NBF +{ + public partial class ItemBasicInfoTag + { + public const string URL = "ui://hxr7rc7pnzfp1p"; + + public GTextField TextTitle; + public GTextField TextDesc; + public GTextField TextContent; + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + TextTitle = (GTextField)GetChild("TextTitle"); + TextDesc = (GTextField)GetChild("TextDesc"); + TextContent = (GTextField)GetChild("TextContent"); + OnInited(); + UILanguage.TrySetComponentLanguage(this); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs.meta b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs.meta new file mode 100644 index 000000000..5b0eb1c00 --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 64ece59eb75f6874b8956a0b1073c8f7 \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs new file mode 100644 index 000000000..5e150906c --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs @@ -0,0 +1,23 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; +using NBF.Utils; + +namespace NBF +{ + public partial class ItemBasicInfoTag : GComponent + { + private void OnInited() + { + } + + public void SetInfo(ItemInfo itemInfo) + { + var itemConfig = ItemConfig.Get(itemInfo.ConfigId); + TextTitle.text = itemInfo.ConfigId.GetName(); + TextTitle.SetQuality(itemInfo.Config.Quality); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs.meta b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs.meta new file mode 100644 index 000000000..890ed88fd --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemBasicInfoTag.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 62624753a7f37ea4c93a816a7ebac8e3 \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemDetailsContent.Designer.cs b/Assets/Scripts/UI/Bag/ItemDetailsContent.Designer.cs index 9209c6af4..be69f6048 100644 --- a/Assets/Scripts/UI/Bag/ItemDetailsContent.Designer.cs +++ b/Assets/Scripts/UI/Bag/ItemDetailsContent.Designer.cs @@ -11,15 +11,15 @@ namespace NBF { public const string URL = "ui://hxr7rc7pnzfp1o"; - public GComponent Basic; - public GComponent Gear; + public ItemBasicInfoTag Basic; + public ItemGearInfoTag Gear; public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); - Basic = (GComponent)GetChild("Basic"); - Gear = (GComponent)GetChild("Gear"); + Basic = (ItemBasicInfoTag)GetChild("Basic"); + Gear = (ItemGearInfoTag)GetChild("Gear"); OnInited(); UILanguage.TrySetComponentLanguage(this); } diff --git a/Assets/Scripts/UI/Bag/ItemDetailsContent.cs b/Assets/Scripts/UI/Bag/ItemDetailsContent.cs index 96f11eefd..c7be48f13 100644 --- a/Assets/Scripts/UI/Bag/ItemDetailsContent.cs +++ b/Assets/Scripts/UI/Bag/ItemDetailsContent.cs @@ -11,5 +11,6 @@ namespace NBF private void OnInited() { } + } } \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemDetailsPanel.cs b/Assets/Scripts/UI/Bag/ItemDetailsPanel.cs index 60723f74e..b7e2d9d6b 100644 --- a/Assets/Scripts/UI/Bag/ItemDetailsPanel.cs +++ b/Assets/Scripts/UI/Bag/ItemDetailsPanel.cs @@ -7,6 +7,9 @@ namespace NBF { public partial class ItemDetailsPanel : UIPanel { + public ItemInfo ItemInfo; + + // public protected override void OnInit() { base.OnInit(); @@ -14,6 +17,18 @@ namespace NBF protected override void OnShow() { + ItemInfo = GetData() as ItemInfo; + // Model.SetModel(); + // Instance = Object.Instantiate(prefab); + // Debug.LogError($"预制体:{prefab.name} 实例={Instance}"); + // Model.SetModel(Instance); + + Quality.SetQuality(ItemInfo.Config.Quality); + + + Content.Basic.SetInfo(ItemInfo); + Content.Basic.SetInfo(ItemInfo); + Game.Input.OnUICanceled += OnUICanceled; } diff --git a/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs b/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs new file mode 100644 index 000000000..79984d067 --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs @@ -0,0 +1,29 @@ +/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/ + + +using FairyGUI; +using FairyGUI.Utils; +using NBC; + +namespace NBF +{ + public partial class ItemGearInfoTag + { + public const string URL = "ui://hxr7rc7pnzfp1q"; + + public GTextField TextTitle; + public GRichTextField TextDesc; + public GList List; + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + TextTitle = (GTextField)GetChild("TextTitle"); + TextDesc = (GRichTextField)GetChild("TextDesc"); + List = (GList)GetChild("List"); + OnInited(); + UILanguage.TrySetComponentLanguage(this); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs.meta b/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs.meta new file mode 100644 index 000000000..16c808856 --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemGearInfoTag.Designer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6210f89fdfdedcf43ad112aee8624548 \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs b/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs new file mode 100644 index 000000000..108bcc7df --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs @@ -0,0 +1,19 @@ +// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖 + +using UnityEngine; +using FairyGUI; +using NBC; + +namespace NBF +{ + public partial class ItemGearInfoTag : GComponent + { + private void OnInited() + { + } + + public void SetInfo(ItemInfo itemInfo) + { + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs.meta b/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs.meta new file mode 100644 index 000000000..7d2569744 --- /dev/null +++ b/Assets/Scripts/UI/Bag/ItemGearInfoTag.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 32b242aeba14ccf4e8daab2f502128e3 \ No newline at end of file diff --git a/Assets/Scripts/UI/Binders/MainBinder.cs b/Assets/Scripts/UI/Binders/MainBinder.cs index 86fb0a97b..f657945a1 100644 --- a/Assets/Scripts/UI/Binders/MainBinder.cs +++ b/Assets/Scripts/UI/Binders/MainBinder.cs @@ -21,6 +21,8 @@ namespace NBF UIObjectFactory.SetPackageItemExtension(ChatItem.URL, typeof(ChatItem)); UIObjectFactory.SetPackageItemExtension(GearItem.URL, typeof(GearItem)); UIObjectFactory.SetPackageItemExtension(ItemDetailsContent.URL, typeof(ItemDetailsContent)); + UIObjectFactory.SetPackageItemExtension(ItemBasicInfoTag.URL, typeof(ItemBasicInfoTag)); + UIObjectFactory.SetPackageItemExtension(ItemGearInfoTag.URL, typeof(ItemGearInfoTag)); UIObjectFactory.SetPackageItemExtension(BagItem.URL, typeof(BagItem)); } } diff --git a/Config/Gear.xlsx b/Config/Gear.xlsx index 1516823fa..d24a0fba1 100644 Binary files a/Config/Gear.xlsx and b/Config/Gear.xlsx differ diff --git a/Config/Item.xlsx b/Config/Item.xlsx index fc86bb8d8..dca64635d 100644 Binary files a/Config/Item.xlsx and b/Config/Item.xlsx differ diff --git a/FGUIProject/assets/Main/Com/ItemBasicInfoTag.xml b/FGUIProject/assets/Main/Com/ItemBasicInfoTag.xml index 169219724..9e6f9e549 100644 --- a/FGUIProject/assets/Main/Com/ItemBasicInfoTag.xml +++ b/FGUIProject/assets/Main/Com/ItemBasicInfoTag.xml @@ -1,7 +1,7 @@ - + diff --git a/FGUIProject/assets/Main/Com/Items/BagItem.xml b/FGUIProject/assets/Main/Com/Items/BagItem.xml index 617b78600..390df9293 100644 --- a/FGUIProject/assets/Main/Com/Items/BagItem.xml +++ b/FGUIProject/assets/Main/Com/Items/BagItem.xml @@ -1,17 +1,21 @@ - + - + - + - - + + + + + +