UI update 02

This commit is contained in:
FloatGaming
2026-06-30 21:21:30 +08:00
parent b2a1e307a4
commit f62f643cfc
1666 changed files with 211081 additions and 22799 deletions
File diff suppressed because it is too large Load Diff
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 0
expBottleName: "<color=#5F9B6B>\u51E1\u54C1\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: b4bacb7037660594e988bcb14294f656, type: 3}
expBottleSprite: {fileID: 21300000, guid: 10de1d7090f6d9a4c964b586ea9cb287, type: 3}
itemRarity: 1
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#5F9B6B>C\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528</color></b>\uFF0C\u63D0\u5347\u517110\u7ECF\u9A8C\u503C\u3002\u4E00\u822C\u9700\u8981500\u7ECF\u9A8C\u53471\u5230D\u7EA7\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 1
expBottleName: "<color=#4A86B8>\u4E2D\u54C1\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 44c1abe7153739d429315227c0f3493d, type: 3}
expBottleSprite: {fileID: 21300000, guid: dcd83e8a72bc0d440abc1a45fcaa6f2b, type: 3}
itemRarity: 2
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#4A86B8>B\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528</color></b>\uFF0C\u63D0\u5347\u517120\u7ECF\u9A8C\u503C\u3002\u4E00\u822C\u9700\u89811000\u7ECF\u9A8C\u53471\u5230A\u7EA7\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 2
expBottleName: "<color=#8A6CB0>\u4E0A\u54C1\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 0a7c3c46f2eb6ec4188b6622b03c296a, type: 3}
expBottleSprite: {fileID: 21300000, guid: 13dccfed270ea314baacb469c81b4a32, type: 3}
itemRarity: 3
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#8A6CB0>A\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528</color></b>\uFF0C\u63D0\u5347\u517120\u7ECF\u9A8C\u503C\u3002\u4E00\u822C\u9700\u89812000\u7ECF\u9A8C\u53471\u5230S\u7EA7\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 3
expBottleName: "<color=#B88645>\u6781\u54C1\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 42ec6fdae47e3474783bdbc659fdcd5b, type: 3}
expBottleSprite: {fileID: 21300000, guid: ba4af38dbec3f8443ba4ea3bc9830874, type: 3}
itemRarity: 4
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#B88645>\u51C6S\u9605\u5386\u8D44\u683C\u5076\u50CF\u6548\u7528</color></b>\uFF0C\u4F5C\u4E3A\u7A81\u7834\u8017\u6750\uFF0C\u4E0D\u63D0\u4F9B\u7ECF\u9A8C\u3002\u53EF\u753127\u4E2A\u4E0A\u54C1\u590D\u6F14\u5355\u5143\u5408\u6210\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 4
expBottleName: "<color=#B84C4C>\u7EDD\u54C1\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 07a61fc4925744345829ebecc8ec2d65, type: 3}
expBottleSprite: {fileID: 21300000, guid: a2add83e82c6ae04b814ed8adea43785, type: 3}
itemRarity: 5
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#B84C4C>\u4EFB\u610F\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528</color></b>\uFF0C\u7ACB\u523B\u83B7\u5F97\u8DDD\u79BB\u5F53\u524D\u4E0B\u4E00\u7EA7\u7A81\u7834\u6240\u9700\u7684\u5269\u4F59\u7ECF\u9A8C\u503C\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 5
expBottleName: "<color=#D96C9E>\u4ED9\u54C1\u8D85\u80FD\u590D\u6F14\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 24c71fb1f433cc046b33fd3a2cbb28f6, type: 3}
expBottleSprite: {fileID: 21300000, guid: b9cf7968f27804d49ba9d37de9b93046, type: 3}
itemRarity: 6
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "<b><color=#D96C9E>\u4EFB\u610F\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528</color></b>\uFF0C\u7ACB\u523B\u8BA9\u5076\u50CF\u8FBE\u5230\u51C6S\u7A81\u7834\u6C34\u5E73\uFF0C\u5E76\u8865\u9F50\u4E2D\u95F4\u7701\u7565\u7684\u7A81\u7834\u6750\u6599\u53EF\u6210\u529F\u7A81\u7834\u81F3S\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 6
expBottleName: "<color=#5F9B6B>\u5171\u4EAB\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: 119d6caf259b1564c95cf54f5ccf5d24, type: 3}
expBottleSprite: {fileID: 21300000, guid: 03010783427589943a986fe133eb2c40, type: 3}
itemRarity: 3
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "\u4F7F\u7528\u540E\u7ED9\u968F\u673A3\u4E2A\u672A\u5230\u8FBE\u7A81\u7834\u9650\u5236\u7684\u5076\u50CF\u63D0\u4F9B10\u7ECF\u9A8C\u3002\u5982\u679C\u5269\u4F59\u5076\u50CF\u6570\u91CF\u4E0D\u6EE1\u8DB3\uFF0C\u80FD\u53D1\u591A\u5C11\u4EBA\u53D1\u591A\u5C11\uFF0C\u4E0D\u989D\u5916\u591A\u53D1\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 7
expBottleName: "<color=#4A86B8>\u9AD8\u7EA7\u5171\u4EAB\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: e270aad0cf285c04dac5a6758b069e63, type: 3}
expBottleSprite: {fileID: 21300000, guid: 60bec71a4803ef142996f604e9cceefa, type: 3}
itemRarity: 4
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "\u4F7F\u7528\u540E\u7ED9\u968F\u673A4\u4E2A\u672A\u5230\u8FBE\u7A81\u7834\u9650\u5236\u7684\u5076\u50CF\u63D0\u4F9B20\u7ECF\u9A8C\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bottleKind: 8
expBottleName: "<color=#8A6CB0>\u8D85\u7EA7\u5171\u4EAB\u5355\u5143</color>"
expBottleSprite: {fileID: 21300000, guid: e74de04611dd13249901884ca82ba46c, type: 3}
expBottleSprite: {fileID: 21300000, guid: 02bda42f9d3e8d44fbdc71f16f7f5d46, type: 3}
itemRarity: 5
expBottleUsage: "\u89D2\u8272\u57F9\u517B"
expBottleDescription: "\u4F7F\u7528\u540E\u7ED9\u968F\u673A5\u4E2A\u672A\u5230\u8FBE\u7A81\u7834\u9650\u5236\u7684\u5076\u50CF\u63D0\u4F9B30\u7ECF\u9A8C\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
materialKind: 0
growthMaterialName: "<color=#4A86B8>\u4E09\u7EA7\u5F52\u6863\u5408\u7EA6</color>"
growthMaterialSprite: {fileID: 21300000, guid: 26b4d8692c5e74d17bd9dc28bcbe961b, type: 3}
growthMaterialSprite: {fileID: 21300000, guid: 1d7736a1cf9771648937563b3a46692b, type: 3}
itemRarity: 2
growthMaterialUsage: "\u89D2\u8272\u7A81\u7834"
growthMaterialDescription: "\u53EA\u6709\u6EE1\u7ECF\u9A8C\u7684C\u5076\u50CF\u53EF\u7528\u3002\u8DB3\u591F\u6570\u91CF\u7684\u5F52\u6863\u5408\u7EA6\u548C\u4E00\u5B9A\u91D1\u5E01\u53EF\u4F7F\u5176\u7A81\u7834\u81F3B\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
materialKind: 1
growthMaterialName: "<color=#8A6CB0>\u4E8C\u7EA7\u5F52\u6863\u5408\u7EA6</color>"
growthMaterialSprite: {fileID: 21300000, guid: b83080d92786f42589381bbe09110c3c, type: 3}
growthMaterialSprite: {fileID: 21300000, guid: c127de0638777b44abde4d860bd00436, type: 3}
itemRarity: 3
growthMaterialUsage: "\u89D2\u8272\u7A81\u7834"
growthMaterialDescription: "\u53EA\u6709\u6EE1\u7ECF\u9A8C\u7684B\u5076\u50CF\u53EF\u7528\u3002\u8DB3\u591F\u6570\u91CF\u7684\u5F52\u6863\u5408\u7EA6\u548C\u4E00\u5B9A\u91D1\u5E01\u53EF\u4F7F\u5176\u7A81\u7834\u81F3A\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
materialKind: 2
growthMaterialName: "<color=#B88645>\u4E00\u7EA7\u5F52\u6863\u5408\u7EA6</color>"
growthMaterialSprite: {fileID: 21300000, guid: 6fc31519aded24a839c1af9e163b6c01, type: 3}
growthMaterialSprite: {fileID: 21300000, guid: ff5a196ca29ac7940b52badef5f6cc9a, type: 3}
itemRarity: 4
growthMaterialUsage: "\u89D2\u8272\u7A81\u7834"
growthMaterialDescription: "\u53EA\u6709\u6EE1\u7ECF\u9A8C\u7684A\u5076\u50CF\u53EF\u7528\u3002\u8DB3\u591F\u6570\u91CF\u7684\u5F52\u6863\u5408\u7EA6\u548C\u4E00\u5B9A\u91D1\u5E01\u53EF\u4F7F\u5176\u7A81\u7834\u81F3S\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
materialKind: 3
growthMaterialName: "<color=#B84C4C>\u901A\u7528\u5F52\u6863\u5408\u7EA6</color>"
growthMaterialSprite: {fileID: 21300000, guid: b72023ef6c5c54ebb94ee8c520cfe2e9, type: 3}
growthMaterialSprite: {fileID: 21300000, guid: 6c859c4435743da4da5fa9039a885d17, type: 3}
itemRarity: 5
growthMaterialUsage: "\u89D2\u8272\u7A81\u7834"
growthMaterialDescription: "\u6EE1\u7ECF\u9A8C\u7684\u4EFB\u610F\u9605\u5386\u8D44\u683C\u5076\u50CF\u53EF\u7528\u3002\u8DB3\u591F\u6570\u91CF\u7684\u5F52\u6863\u5408\u7EA6\u548C\u4E00\u5B9A\u91D1\u5E01\u53EF\u4F7F\u5176\u7A81\u7834\u81F3S\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
consumableKind: 0
consumableName: "<color=#6A4C9C>\u7F8E\u5473\u5C0F\u86CB\u7CD5</color>"
consumableSprite: {fileID: 21300000, guid: 2cc4c147b6b7649d6ac98a928018c544, type: 3}
consumableSprite: {fileID: 21300000, guid: 636f729e43ab20a4e8c3db14ea2e839d, type: 3}
itemRarity: 2
consumableUsage: "\u88C5\u5907\u5347\u9636"
consumableDescription: "\u4E00\u5757\u770B\u4E0A\u53BB\u5F88\u597D\u5403\u7684\u6155\u65AF\u5976\u6CB9\u86CB\u7CD5\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u8BB0\u5FC6\u8FFD\u5FC6"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
consumableKind: 1
consumableName: "<color=#B84C4C>\u5927\u578B\u70ED\u91CF\u70B8\u5F39</color>"
consumableSprite: {fileID: 21300000, guid: 5e0181b769b64401bac538a3310aa847, type: 3}
consumableSprite: {fileID: 21300000, guid: 16ae7ec655cacbf4792dd84fb264f560, type: 3}
itemRarity: 3
consumableUsage: "\u88C5\u5907\u5E7B\u5316"
consumableDescription: "\u4E00\u4E2A\u5DE8\u5927\u768414\u5BF8\u6C34\u679C\u6155\u65AF\u5976\u6CB9\u86CB\u7CD5\uFF0C\u5B83\u5C06\u4F60\u5E26\u56DE\u4E86\u4F60\u4E0E\u521D\u604B\u7EA6\u4F1A\u7684\u90A3\u4E2A\u751C\u871C\u590F\u5929\u3002\n\n\u4F60\u671B\u7740\u5979\u7684\u80CC\u5F71\uFF0C\u5FC3\u4E2D\u90A3\u53E5\u8BDD\u6700\u7EC8\u8FD8\u662F\u6CA1\u6709\u8BF4\u51FA\u53E3\u3002\u5915\u9633\u4E2D\u4F60\u62D9\u52A3\u5730\u62E8\u5F04\u7740\u5409\u4ED6\u7684\u7434\u5F26\uFF0C\u534A\u751F\u4E0D\u719F\u5730\u5F39\u7740\u901F\u6210\u7684\u7B80\u5355\u8C31\u5B50\u3002\u5979\u8010\u5FC3\u5730\u542C\u5B8C\u4E86\uFF0C\u9752\u6DA9\u7684\u8138\u5E9E\u6CDB\u8D77\u7F9E\u6DA9\u817C\u8146\u7684\u7EA2\u6655\u3002\u5FAE\u98CE\u4E2D\uFF0C\u5979\u7684\u957F\u53D1\u5212\u8FC7\u5634\u89D2\uFF0C\u9732\u51FA\u53EA\u6709\u4F60\u80FD\u8BFB\u61C2\u7684\u5F27\u5EA6\u3002\n\n\u2014\u2014\u591A\u5E74\u8FC7\u53BB\uFF0C\u4F60\u518D\u672A\u5F97\u5230\u5979\u7684\u4EFB\u4F55\u6D88\u606F\u3002\u90A3\u628A\u5409\u4ED6\u627F\u8F7D\u7740\u4F60\u7684\u56DE\u5FC6\uFF0C\u6162\u6162\u5728\u5899\u89D2\u72EC\u81EA\u53D1\u9709\u3002\u60C5\u4E0D\u81EA\u7981\u5728\u8111\u6D77\u4E2D\u56DE\u671B\uFF0C\u4F46\u90A3\u91CC\u5DF2\u7ECF\u6CA1\u6709\u5979\u7684\u8EAB\u5F71\u4E86\u3002\n\n\u6B64\u6D88\u8017\u54C1\u7528\u4E8E<color=#B84C4C>\u8BB0\u5FC6\u5DE1\u6F14</color>\uFF0C\u5C06\u4F60\u77ED\u6682\u5730\u5E26\u56DE\u4F60\u751F\u547D\u4E2D\u6700\u5E78\u798F\u7684\u65F6\u523B\u3002\u53EA\u662F\u7247\u523B\u4E4B\u95F4\u4E5F\u4F1A\u5F88\u5FEB\u5316\u4F5C\u6CE1\u5F71\u5427\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
consumableKind: 2
consumableName: "\u524D\u5C18\u4F59\u97F5\u6E90\u6676"
consumableSprite: {fileID: 21300000, guid: a470194d6b54e8848b0b338c688da9ed, type: 3}
consumableSprite: {fileID: 21300000, guid: abf84675d0fe674478e2994c05c85e5a, type: 3}
itemRarity: 4
consumableUsage: "\u88C5\u5907\u6D17\u70BC"
consumableDescription: "\u7528\u4E8E\u88C5\u5907\u6D17\u70BC\uFF08\u5C5E\u6027\u8F6C\u79FB\uFF09\u7684\u6D88\u8017\u54C1\u3002"
@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
consumableKind: 3
consumableName: "\u60CA\u9E3F\u68A6\u9192\u4E4B\u529B"
consumableSprite: {fileID: 21300000, guid: b744ed0c702d8994982728691f19e3ed, type: 3}
consumableSprite: {fileID: 21300000, guid: 74e8a6162cf9a9f4fb524a1200191a3f, type: 3}
itemRarity: 7
consumableUsage:
consumableDescription: "\u7528\u4E8E\u88C5\u5907\u767B\u9876\u5F3A\u5316\u7684\u6D88\u8017\u54C1\u3002"
+242 -39
View File
@@ -36,7 +36,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -90}
m_AnchoredPosition: {x: 0, y: -95}
m_SizeDelta: {x: 0, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6431747892200343176
@@ -57,7 +57,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 20
m_Spacing: 30
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
@@ -79,6 +79,85 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
--- !u!1 &689646750541754719
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3108609342140803728}
- component: {fileID: 7401817610350910887}
- component: {fileID: 6438099692183871454}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &3108609342140803728
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 689646750541754719}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5397983449705360434}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7401817610350910887
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 689646750541754719}
m_CullTransparentMesh: 1
--- !u!114 &6438099692183871454
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 689646750541754719}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Button
--- !u!1 &890466348562260497
GameObject:
m_ObjectHideFlags: 0
@@ -108,12 +187,13 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 10752499163864956}
m_Father: {fileID: 5921161486854863533}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -35.08}
m_AnchoredPosition: {x: 0, y: -20}
m_SizeDelta: {x: 150, y: 19.841}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1419193971929267112
@@ -213,7 +293,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@@ -267,7 +347,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 113.37}
m_SizeDelta: {x: 200, y: 0}
m_SizeDelta: {x: 200, y: 206}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1416835080812713061
CanvasRenderer:
@@ -297,7 +377,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
m_Sprite: {fileID: 21300000, guid: a3ab628d6dae8c844bcc5bcfa59c40d8, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
@@ -405,20 +485,20 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Color: {r: 0.63529414, g: 0.3529412, b: 0.16862746, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
m_FontSize: 20
m_Font: {fileID: 12800000, guid: d254d20d93651ae448ff13d10dff30ab, type: 3}
m_FontSize: 24
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 1
m_MaxSize: 20
m_MaxSize: 24
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
@@ -492,7 +572,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
m_Font: {fileID: 12800000, guid: d254d20d93651ae448ff13d10dff30ab, type: 3}
m_FontSize: 24
m_FontStyle: 0
m_BestFit: 0
@@ -540,7 +620,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 10, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_SizeDelta: {x: 28, y: 28}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8860752961003304426
CanvasRenderer:
@@ -564,7 +644,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@@ -580,6 +660,127 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3476638221228115232
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5397983449705360434}
- component: {fileID: 5427896433554964291}
- component: {fileID: 5667076835668816897}
- component: {fileID: 2124737719897160825}
m_Layer: 5
m_Name: quickBuy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5397983449705360434
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3476638221228115232}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3108609342140803728}
m_Father: {fileID: 5921161486854863533}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -3, y: -95}
m_SizeDelta: {x: 200, y: 59}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5427896433554964291
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3476638221228115232}
m_CullTransparentMesh: 1
--- !u!114 &5667076835668816897
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3476638221228115232}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 416a84d0cc7c0064ab459c12d1e84c17, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2124737719897160825
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3476638221228115232}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5667076835668816897}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &3528620667132670035
GameObject:
m_ObjectHideFlags: 0
@@ -614,7 +815,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -61.6}
m_AnchoredPosition: {x: 0, y: -48}
m_SizeDelta: {x: 185, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3409889011519700908
@@ -638,7 +839,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_Color: {r: 0.27450982, g: 0.34901962, b: 0.54901963, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@@ -647,7 +848,7 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: dfa10de3e2846524089b5073175cd151, type: 3}
m_FontSize: 21
m_FontSize: 24
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
@@ -691,10 +892,10 @@ RectTransform:
m_Children: []
m_Father: {fileID: 8633556444786757764}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 147.8589, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 93.92945, y: -60}
m_SizeDelta: {x: 147.8589, y: 126}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1020266739791017191
CanvasRenderer:
@@ -768,11 +969,11 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5921161486854863533}
m_Father: {fileID: 5089841266874238871}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -35}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2891040171610729402
@@ -842,16 +1043,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4514328544703093360}
m_LocalRotation: {x: -0, y: -0, z: 0.2588191, w: 0.9659258}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5921161486854863533}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 30}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -90.6, y: 119.1}
m_AnchoredPosition: {x: -66, y: 117.5}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4234624418413431242
@@ -876,7 +1077,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@@ -891,8 +1092,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
rgba: 4282072063
m_fontColor: {r: 1, g: 0.23113209, b: 0.23113209, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@@ -969,7 +1170,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &5361600481508708172
RectTransform:
m_ObjectHideFlags: 0
@@ -1037,7 +1238,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 30}
m_AnchoredPosition: {x: 0, y: 45}
m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3953523760438990569
@@ -1114,7 +1315,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 250}
m_SizeDelta: {x: 206, y: 259}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8857417963755220311
CanvasRenderer:
@@ -1137,14 +1338,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.5882353}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: e2c536559de04a84bae8d1e1752633e7, type: 3}
m_Sprite: {fileID: 21300000, guid: e665d871d3b6d4a43ada8d60d3fc60e3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -1301,8 +1502,8 @@ RectTransform:
m_Children:
- {fileID: 7876532034889150413}
- {fileID: 5089841266874238871}
- {fileID: 10752499163864956}
- {fileID: 7525251132633224115}
- {fileID: 5397983449705360434}
- {fileID: 7316545123368939229}
- {fileID: 7932439275264743985}
- {fileID: 2594437270005345926}
@@ -1311,7 +1512,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 250}
m_SizeDelta: {x: 206, y: 259}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2471743000415371932
CanvasRenderer:
@@ -1341,7 +1542,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: e2c536559de04a84bae8d1e1752633e7, type: 3}
m_Sprite: {fileID: 21300000, guid: f3658a5680d44564da3d82710c43afec, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -1416,6 +1617,8 @@ MonoBehaviour:
descriptionObject: {fileID: 5054145043207290238}
itemTitle: {fileID: 7715410364154155532}
itemDescription: {fileID: 8779029512136503066}
quickBuyButton: {fileID: 2124737719897160825}
quickBuy_cannotBuy_mtr: {fileID: 2100000, guid: 7701c15f96b443d408ac83222c9b869a, type: 2}
--- !u!114 &2932416145409636011
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1441,7 +1644,7 @@ MonoBehaviour:
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 1, g: 0.8160377, b: 0.9358919, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
+57 -4
View File
@@ -18,9 +18,9 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
public Text thisItem_priceText;
[Header("other")]
public GameObject rightCorner_statusImage; //这个是用来显示限量或新品等状态的图标
public GameObject leftCorner_statusImage; //这个是用来显示售罄等状态的图标
public GameObject lock_cannotClickImage; //这个是用来显示无法点击的锁图标的
public GameObject rightCorner_statusImage; //这个是用来显示限量或新品等状态的图标
public GameObject leftCorner_statusImage; //这个是用来显示售罄等状态的图标
public GameObject lock_cannotClickImage; //这个是用来显示无法点击的锁图标的
[Header("texts")]
public Text why_cannot_buy;
@@ -30,7 +30,12 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
public Text itemTitle;
public Text itemDescription;
[Header("quick buy")]
public Button quickBuyButton;
public Material quickBuy_cannotBuy_mtr;
public Action<storeItemPrefab> onItemClicked;
public Action<storeItemPrefab> onQuickBuyClicked;
private const float ShowDelay = 0.5f;
private const float HideDelay = 0.25f;
@@ -40,10 +45,13 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
private Coroutine pendingShowCoroutine;
private Coroutine pendingHideCoroutine;
private int lastNotifyFrame = -1;
private Graphic quickBuyGraphic;
private Material quickBuyDefaultMaterial;
private void Awake()
{
PrepareDescriptionPanel();
PrepareQuickBuyButton();
}
private void OnDisable()
@@ -114,6 +122,29 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
}
}
public void NotifyQuickBuyClicked()
{
if (onQuickBuyClicked != null)
{
onQuickBuyClicked(this);
}
}
public void RefreshQuickBuyState(bool canQuickBuy)
{
if (quickBuyButton != null)
{
quickBuyButton.interactable = canQuickBuy;
}
if (quickBuyGraphic == null)
{
return;
}
quickBuyGraphic.material = canQuickBuy ? quickBuyDefaultMaterial : quickBuy_cannotBuy_mtr;
}
public void SetDescriptionContent(string title, string description)
{
if (itemTitle != null)
@@ -123,7 +154,7 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
if (itemDescription != null)
{
itemDescription.text = string.IsNullOrWhiteSpace(description) ? "暂无描述信息" : description;
itemDescription.text = string.IsNullOrWhiteSpace(description) ? "暂无描述信息" : description;
}
}
@@ -147,6 +178,28 @@ public class storeItemPrefab : MonoBehaviour, IPointerClickHandler, IPointerEnte
descriptionObject.SetActive(false);
}
private void PrepareQuickBuyButton()
{
if (quickBuyButton == null)
{
return;
}
quickBuyButton.onClick.RemoveListener(NotifyQuickBuyClicked);
quickBuyButton.onClick.AddListener(NotifyQuickBuyClicked);
quickBuyGraphic = quickBuyButton.targetGraphic;
if (quickBuyGraphic == null)
{
quickBuyGraphic = quickBuyButton.GetComponent<Graphic>();
}
if (quickBuyGraphic != null)
{
quickBuyDefaultMaterial = quickBuyGraphic.material;
}
}
private IEnumerator ShowDescriptionWithDelay()
{
yield return new WaitForSeconds(ShowDelay);
+207 -22
View File
@@ -1,12 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using Bansonic;
using UnityEngine;
using UnityEngine.UI;
public class storeSystem : MonoBehaviour
{
private static readonly Regex RichTextTagRegex = new Regex("<.*?>", RegexOptions.Compiled);
private static readonly string[] SortDropdownOptionLabels =
{
"默认排序",
"价格升序",
"价格降序",
"类型升序",
"类型降序",
"限购升序",
"限购降序"
};
private const string ShowOnlyPurchasablePrefKey = "store.show_only_can_purchase";
private const string SortDropdownPrefKey = "store.sort_dropdown_value";
private const string StoreStateSaveCategory = "store_state";
@@ -48,7 +60,10 @@ public class storeSystem : MonoBehaviour
[Header("selecting item purchase")]
public Text p_itemName;
[SerializeField] private bool p_itemNameFollowRichTextColor = true;
public Image p_itemImage;
public Image p_itemRarityBtmImage;
public Sprite[] raritybtmImageSprite;
public Image p_sumCostImage;
public Text p_sumCostText;
public Button p_iAmount_plus;
@@ -89,6 +104,7 @@ public class storeSystem : MonoBehaviour
defaultSumCostColor = p_sumCostText.color;
}
InitializeSortDropdownOptions();
CacheToggles();
RegisterHeaderControlCallbacks();
RegisterToggleCallbacks();
@@ -361,6 +377,26 @@ public class storeSystem : MonoBehaviour
}
}
private void InitializeSortDropdownOptions()
{
if (sortDropdown == null)
{
return;
}
sortDropdown.onValueChanged.RemoveListener(OnSortDropdownValueChanged);
sortDropdown.ClearOptions();
var options = new List<Dropdown.OptionData>(SortDropdownOptionLabels.Length);
for (int i = 0; i < SortDropdownOptionLabels.Length; i++)
{
options.Add(new Dropdown.OptionData(SortDropdownOptionLabels[i]));
}
sortDropdown.AddOptions(options);
sortDropdown.RefreshShownValue();
}
private void TryCacheStoreItem(storeItemSO itemSO, string sourceLabel, HashSet<int> uniqueItemIds)
{
if (itemSO == null)
@@ -674,6 +710,7 @@ public class storeSystem : MonoBehaviour
itemView.thisItemSO = itemSO;
itemView.onItemClicked = HandleItemClicked;
itemView.onQuickBuyClicked = HandleQuickBuyClicked;
var button = instance.GetComponent<Button>();
if (button != null)
@@ -701,6 +738,7 @@ public class storeSystem : MonoBehaviour
SetupPrice(itemView, itemSO);
SetupAvailabilityState(itemView, itemSO);
SetupReadState(itemView, itemSO);
SetupQuickBuyState(itemView, itemSO);
}
private void ResolveVisibleSelection(List<storeItemSO> visibleItems)
@@ -750,9 +788,12 @@ public class storeSystem : MonoBehaviour
if (p_itemName != null)
{
p_itemName.text = itemSO.itemName ?? string.Empty;
p_itemName.text = GetDisplayItemName(itemSO.itemName);
ApplyItemNameColorState(p_itemName);
}
ApplyItemRarityBottomState(itemSO);
if (p_itemImage != null)
{
p_itemImage.sprite = itemSO.itemIcon;
@@ -790,6 +831,7 @@ public class storeSystem : MonoBehaviour
if (p_itemName != null)
{
p_itemName.text = string.Empty;
ApplyItemNameColorState(p_itemName);
}
if (p_itemImage != null)
@@ -808,6 +850,8 @@ public class storeSystem : MonoBehaviour
p_itemUsageText.text = string.Empty;
}
ApplyItemRarityBottomState(null);
if (p_sumCostText != null)
{
p_sumCostText.text = string.Empty;
@@ -1081,37 +1125,55 @@ public class storeSystem : MonoBehaviour
return;
}
if (PlayerSkillService.IsPlayerSkillStoreItem(currentSelectedItem))
ExecutePurchase(currentSelectedItem, currentPurchaseAmount, true);
}
private void ExecutePurchase(storeItemSO itemSO, int purchaseAmount, bool refreshSummaryOnFailure)
{
if (itemSO == null)
{
HandlePlayerSkillStorePurchaseClicked(currentSelectedItem);
return;
}
if (IsSelectableEquipmentRewardItem(currentSelectedItem))
if (PlayerSkillService.IsPlayerSkillStoreItem(itemSO))
{
HandleSelectableEquipmentPurchaseClicked(currentSelectedItem);
HandlePlayerSkillStorePurchaseClicked(itemSO, purchaseAmount, refreshSummaryOnFailure);
return;
}
if (IsSelectableEquipmentRewardItem(itemSO))
{
HandleSelectableEquipmentPurchaseClicked(itemSO, purchaseAmount, refreshSummaryOnFailure);
return;
}
string failureMessage;
int grantedCount;
if (!StoreExpBottlePurchaseService.TryPurchase(playerData, currentSelectedItem, currentPurchaseAmount, out failureMessage, out grantedCount))
if (!StoreExpBottlePurchaseService.TryPurchase(playerData, itemSO, purchaseAmount, out failureMessage, out grantedCount))
{
if (!string.IsNullOrEmpty(failureMessage))
{
gNotice.warning.display(failureMessage);
}
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
RegisterPurchasedCount(currentSelectedItem.itemID, grantedCount);
gItemGet.display(gItemGet.FromStoreItem(currentSelectedItem, grantedCount));
RegisterPurchasedCount(itemSO.itemID, grantedCount);
gItemGet.display(gItemGet.FromStoreItem(itemSO, grantedCount));
RefreshCurrentView();
}
private void HandlePlayerSkillStorePurchaseClicked(storeItemSO itemSO)
{
HandlePlayerSkillStorePurchaseClicked(itemSO, currentPurchaseAmount, true);
}
private void HandlePlayerSkillStorePurchaseClicked(storeItemSO itemSO, int purchaseAmount, bool refreshSummaryOnFailure)
{
if (itemSO == null)
{
@@ -1120,33 +1182,44 @@ public class storeSystem : MonoBehaviour
string failureMessage;
gItemGet.ItemEntry rewardEntry;
if (!PlayerSkillService.TryPurchasePlayerSkillStoreItem(itemSO, currentPurchaseAmount, out failureMessage, out rewardEntry))
if (!PlayerSkillService.TryPurchasePlayerSkillStoreItem(itemSO, purchaseAmount, out failureMessage, out rewardEntry))
{
if (!string.IsNullOrEmpty(failureMessage))
{
gNotice.warning.display(failureMessage);
}
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
RegisterPurchasedCount(itemSO.itemID, currentPurchaseAmount);
RegisterPurchasedCount(itemSO.itemID, purchaseAmount);
gItemGet.display(rewardEntry);
RefreshCurrentView();
}
private void HandleSelectableEquipmentPurchaseClicked(storeItemSO itemSO)
{
HandleSelectableEquipmentPurchaseClicked(itemSO, currentPurchaseAmount, true);
}
private void HandleSelectableEquipmentPurchaseClicked(storeItemSO itemSO, int purchaseAmount, bool refreshSummaryOnFailure)
{
if (itemSO == null)
{
return;
}
if (currentPurchaseAmount != 1)
if (purchaseAmount != 1)
{
SetPurchaseAmount(1, false);
gNotice.warning.display("该物品仅支持单份购买");
if (refreshSummaryOnFailure)
{
SetPurchaseAmount(1, false);
}
return;
}
@@ -1169,7 +1242,10 @@ public class storeSystem : MonoBehaviour
if (!HasEnoughCurrency(primaryCost.currencyType, totalCost))
{
gNotice.warning.display(insufficientMessage);
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
@@ -1178,7 +1254,7 @@ public class storeSystem : MonoBehaviour
if (!requireTypeSelection && !requireSkillSelection)
{
TryCompleteSelectableEquipmentPurchase(itemSO, rewardSource, requirement, null, 0);
TryCompleteSelectableEquipmentPurchase(itemSO, rewardSource, requirement, null, 0, refreshSummaryOnFailure);
return;
}
@@ -1218,7 +1294,7 @@ public class storeSystem : MonoBehaviour
(selectedType, selectedSkillGroupId) =>
{
activeCtasInstance = null;
TryCompleteSelectableEquipmentPurchase(itemSO, rewardSource, requirement, selectedType, selectedSkillGroupId);
TryCompleteSelectableEquipmentPurchase(itemSO, rewardSource, requirement, selectedType, selectedSkillGroupId, refreshSummaryOnFailure);
},
() => { activeCtasInstance = null; });
}
@@ -1228,7 +1304,8 @@ public class storeSystem : MonoBehaviour
smeltStageRewardSO rewardSource,
smeltStageRewardSO.SmeltStageRewardRequirement requirement,
equipmentSO.EquipmentSkillType? selectedType,
int selectedSkillGroupId)
int selectedSkillGroupId,
bool refreshSummaryOnFailure)
{
if (itemSO == null || rewardSource == null || requirement == null || itemSO.costRequirements == null || itemSO.costRequirements.Count == 0)
{
@@ -1243,14 +1320,20 @@ public class storeSystem : MonoBehaviour
if (!HasEnoughCurrency(primaryCost.currencyType, totalCost))
{
gNotice.warning.display(insufficientMessage);
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
if (!TrySpendCurrency(primaryCost.currencyType, totalCost))
{
gNotice.warning.display(insufficientMessage);
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
@@ -1264,7 +1347,10 @@ public class storeSystem : MonoBehaviour
{
RefundCurrency(primaryCost.currencyType, totalCost);
gNotice.warning.display("装备发放失败");
RefreshPurchaseSummary();
if (refreshSummaryOnFailure)
{
RefreshPurchaseSummary();
}
return;
}
@@ -1329,9 +1415,88 @@ public class storeSystem : MonoBehaviour
}
private bool CanPurchaseCurrentSelection(storeItemSO itemSO)
{
return CanPurchaseAmount(itemSO, currentPurchaseAmount);
}
private bool CanPurchaseAmount(storeItemSO itemSO, int purchaseAmount)
{
return IsCurrentlyPurchasable(itemSO)
&& (!IsSelectableEquipmentRewardItem(itemSO) || currentPurchaseAmount == 1);
&& purchaseAmount >= MinPurchaseAmount
&& (!IsSelectableEquipmentRewardItem(itemSO) || purchaseAmount == 1);
}
private void ApplyItemNameColorState(Text itemNameText)
{
if (itemNameText == null)
{
return;
}
itemNameText.supportRichText = p_itemNameFollowRichTextColor;
if (!p_itemNameFollowRichTextColor)
{
itemNameText.color = Color.white;
}
}
private string GetDisplayItemName(string rawItemName)
{
if (string.IsNullOrEmpty(rawItemName))
{
return string.Empty;
}
if (p_itemNameFollowRichTextColor)
{
return rawItemName;
}
return RichTextTagRegex.Replace(rawItemName, string.Empty);
}
private void ApplyItemRarityBottomState(storeItemSO itemSO)
{
if (p_itemRarityBtmImage == null)
{
return;
}
Sprite sprite = ResolveRarityBottomSprite(itemSO != null ? itemSO.itemRarity : ItemRarity.None);
p_itemRarityBtmImage.sprite = sprite;
p_itemRarityBtmImage.enabled = sprite != null;
}
private Sprite ResolveRarityBottomSprite(ItemRarity rarity)
{
if (raritybtmImageSprite != null)
{
int enumIndex = (int)rarity;
if (enumIndex >= 0 && enumIndex < raritybtmImageSprite.Length)
{
Sprite directSprite = raritybtmImageSprite[enumIndex];
if (directSprite != null)
{
return directSprite;
}
}
if (rarity != ItemRarity.None)
{
int compactIndex = (int)rarity - 1;
if (compactIndex >= 0 && compactIndex < raritybtmImageSprite.Length)
{
Sprite compactSprite = raritybtmImageSprite[compactIndex];
if (compactSprite != null)
{
return compactSprite;
}
}
}
}
return null;
}
private bool CanAffordCurrentSelection(long totalCost)
@@ -1522,6 +1687,16 @@ public class storeSystem : MonoBehaviour
}
}
private void SetupQuickBuyState(storeItemPrefab itemView, storeItemSO itemSO)
{
if (itemView == null)
{
return;
}
itemView.RefreshQuickBuyState(itemSO != null && CanPurchaseAmount(itemSO, 1));
}
private bool IsSoldOut(storeItemSO itemSO)
{
if (itemSO == null || itemSO.itemPurchaseQuota < 0)
@@ -1558,6 +1733,16 @@ public class storeSystem : MonoBehaviour
}
}
private void HandleQuickBuyClicked(storeItemPrefab itemView)
{
if (itemView == null || itemView.thisItemSO == null)
{
return;
}
ExecutePurchase(itemView.thisItemSO, 1, false);
}
public void RegisterPurchasedCount(int itemID, int purchasedAmount)
{
if (purchasedAmount <= 0)