From 298345fa172974de969d34600f7d93de831f836b Mon Sep 17 00:00:00 2001 From: SepComet <202308010230@stu.csust.edu.cn> Date: Wed, 4 Mar 2026 19:17:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=20RepoItem=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=80=90=E4=B9=85=E5=8F=98=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../DataStruct/TowerCompItemData.cs | 1 + .../Controller/CombatFinishFormController.cs | 32 +- .../UI/Game/Context/RepoItemContext.cs | 1 + .../UI/Game/Controller/RepoFormController.cs | 32 +- .../UI/Game/UseCase/RepoFormUseCase.cs | 10 +- .../GameMain/Scripts/UI/Game/View/RepoItem.cs | 22 +- .../Scripts/Utility/ItemDescUtility.cs | 88 +++- .../GameMain/UI/UIForms/ItemDescForm.prefab | 55 +-- Assets/GameMain/UI/UIItems/RepoItem.prefab | 414 ++++++++++-------- 10 files changed, 424 insertions(+), 232 deletions(-) diff --git a/.gitignore b/.gitignore index 981c180..99ba133 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ AGENTS.md /[Aa]ssets/RawResources.meta /docs/TODO.md /.dotnet +/.idea diff --git a/Assets/GameMain/Scripts/Definition/DataStruct/TowerCompItemData.cs b/Assets/GameMain/Scripts/Definition/DataStruct/TowerCompItemData.cs index e024274..6ba31d2 100644 --- a/Assets/GameMain/Scripts/Definition/DataStruct/TowerCompItemData.cs +++ b/Assets/GameMain/Scripts/Definition/DataStruct/TowerCompItemData.cs @@ -37,6 +37,7 @@ namespace GeometryTD.Definition /// 组件当前耐久(0~100)。 /// public float Endurance { get; set; } = 100f; + public bool IsAssembledIntoTower { get; set; } /// diff --git a/Assets/GameMain/Scripts/UI/Combat/Controller/CombatFinishFormController.cs b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatFinishFormController.cs index e6cf017..dd7fc66 100644 --- a/Assets/GameMain/Scripts/UI/Combat/Controller/CombatFinishFormController.cs +++ b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatFinishFormController.cs @@ -109,6 +109,9 @@ namespace GeometryTD.UI return System.Array.Empty(); } + Dictionary muzzleMap = BuildComponentMap(inventory.MuzzleComponents); + Dictionary bearingMap = BuildComponentMap(inventory.BearingComponents); + Dictionary baseMap = BuildComponentMap(inventory.BaseComponents); List itemContexts = new List(); if (inventory.Towers != null) @@ -125,6 +128,7 @@ namespace GeometryTD.UI { InstanceId = tower.InstanceId, CanDrag = false, + EnduranceRate01 = ItemDescUtility.ResolveTowerEnduranceRate(tower, muzzleMap, bearingMap, baseMap), ComponentSlotType = TowerCompSlotType.None, IconAreaContext = BuildIconAreaContext(tower) }); @@ -133,7 +137,7 @@ namespace GeometryTD.UI tower.InstanceId, tower.Name, "Tower", - ItemDescUtility.BuildTowerDesc(tower.Stats) ?? string.Empty, + ItemDescUtility.BuildTowerDesc(tower, muzzleMap, bearingMap, baseMap) ?? string.Empty, tower.Stats != null ? tower.Stats.Tags : null); } } @@ -152,6 +156,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = false, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Muzzle, IconAreaContext = BuildIconAreaContext(item) }); @@ -178,6 +183,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = false, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Bearing, IconAreaContext = BuildIconAreaContext(item) }); @@ -205,6 +211,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = false, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Base, IconAreaContext = BuildIconAreaContext(item) }); @@ -254,6 +261,29 @@ namespace GeometryTD.UI }; } + private static Dictionary BuildComponentMap(IReadOnlyList items) + where TComp : TowerCompItemData + { + Dictionary map = new Dictionary(); + if (items == null) + { + return map; + } + + for (int i = 0; i < items.Count; i++) + { + TComp item = items[i]; + if (item == null || item.InstanceId <= 0) + { + continue; + } + + map[item.InstanceId] = item; + } + + return map; + } + private static IconAreaContext BuildIconAreaContext(TowerItemData tower) { if (tower == null) diff --git a/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs index c94b491..6b81471 100644 --- a/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs +++ b/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs @@ -8,6 +8,7 @@ namespace GeometryTD.UI { public long InstanceId; public bool CanDrag; + public float EnduranceRate01; public TowerCompSlotType ComponentSlotType; public IconAreaContext IconAreaContext; } diff --git a/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs b/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs index 6b0ac33..cf000fa 100644 --- a/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs +++ b/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs @@ -102,6 +102,9 @@ namespace GeometryTD.UI return null; } + Dictionary muzzleMap = BuildComponentMap(rawData.Inventory.MuzzleComponents); + Dictionary bearingMap = BuildComponentMap(rawData.Inventory.BearingComponents); + Dictionary baseMap = BuildComponentMap(rawData.Inventory.BaseComponents); List items = new List(); if (rawData.Inventory.Towers != null) @@ -117,6 +120,7 @@ namespace GeometryTD.UI { InstanceId = tower.InstanceId, CanDrag = true, + EnduranceRate01 = ItemDescUtility.ResolveTowerEnduranceRate(tower, muzzleMap, bearingMap, baseMap), ComponentSlotType = TowerCompSlotType.None, IconAreaContext = BuildIconAreaContext(tower) }); @@ -124,7 +128,7 @@ namespace GeometryTD.UI tower.InstanceId, tower.Name, "Tower", - ItemDescUtility.BuildTowerDesc(tower.Stats) ?? string.Empty, + ItemDescUtility.BuildTowerDesc(tower, muzzleMap, bearingMap, baseMap) ?? string.Empty, tower.Stats != null ? tower.Stats.Tags : null); } } @@ -142,6 +146,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = true, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Muzzle, IconAreaContext = BuildIconAreaContext(item) }); @@ -167,6 +172,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = true, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Bearing, IconAreaContext = BuildIconAreaContext(item) }); @@ -192,6 +198,7 @@ namespace GeometryTD.UI { InstanceId = item.InstanceId, CanDrag = true, + EnduranceRate01 = ItemDescUtility.ResolveComponentEnduranceRate(item), ComponentSlotType = TowerCompSlotType.Base, IconAreaContext = BuildIconAreaContext(item) }); @@ -258,6 +265,29 @@ namespace GeometryTD.UI }; } + private static Dictionary BuildComponentMap(IReadOnlyList items) + where TComp : TowerCompItemData + { + Dictionary map = new Dictionary(); + if (items == null) + { + return map; + } + + for (int i = 0; i < items.Count; i++) + { + TComp item = items[i]; + if (item == null || item.InstanceId <= 0) + { + continue; + } + + map[item.InstanceId] = item; + } + + return map; + } + private static IconAreaContext BuildIconAreaContext(TowerItemData tower) { if (tower == null) diff --git a/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs b/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs index da62683..eeaba22 100644 --- a/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs +++ b/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs @@ -57,7 +57,7 @@ namespace GeometryTD.UI ConfigId = 2, Name = "控制枪口", Rarity = RarityType.Blue, - Endurance = 100f, + Endurance = 80, IsAssembledIntoTower = false, AttackDamage = new[] { 30, 50, 70, 90, 100 }, DamageRandomRate = 0.01f, @@ -86,7 +86,7 @@ namespace GeometryTD.UI ConfigId = 1, Name = "元素轴承", Rarity = RarityType.Green, - Endurance = 95f, + Endurance = 1f, IsAssembledIntoTower = true, RotateSpeed = new[] { 10f, 12f, 13f, 14f, 15f }, AttackRange = new[] { 2f, 2f, 2f, 2f, 2f }, @@ -100,7 +100,7 @@ namespace GeometryTD.UI ConfigId = 2, Name = "控制轴承", Rarity = RarityType.Blue, - Endurance = 100f, + Endurance = 20, IsAssembledIntoTower = false, RotateSpeed = new[] { 20f, 25f, 30f, 32f, 35f }, AttackRange = new[] { 6f, 6.5f, 7f, 8f, 8f }, @@ -141,7 +141,7 @@ namespace GeometryTD.UI ConfigId = 2, Name = "控制底座", Rarity = RarityType.Blue, - Endurance = 100f, + Endurance = 50f, IsAssembledIntoTower = false, AttackSpeed = new[] { 4f, 4.2f, 4.4f, 4.6f, 4.8f }, AttackPropertyType = AttackPropertyType.Ice, @@ -154,7 +154,7 @@ namespace GeometryTD.UI ConfigId = 3, Name = "穿透底座", Rarity = RarityType.Purple, - Endurance = 95f, + Endurance = 30f, IsAssembledIntoTower = false, AttackSpeed = new[] { 1f, 1f, 1f, 1f, 1f }, AttackPropertyType = AttackPropertyType.Physics, diff --git a/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs b/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs index 8c05584..a2df8fa 100644 --- a/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs +++ b/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs @@ -9,11 +9,13 @@ namespace GeometryTD.UI { public class RepoItem : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler { - [SerializeField] private Image _highlightImage; + [SerializeField] private Image _bgImage; + [SerializeField] private IconArea _iconArea; - private static readonly Color NormalColor = new Color32(40, 40, 40, 180); private static readonly Color SelectedColor = new Color32(255, 216, 102, 255); + private static readonly Color EmptyEnduranceColor = new Color(0.8f, 0f, 0f, 1f); + private static readonly Color FullEnduranceColor = new Color(0f, 0.8f, 0f, 1f); private static readonly Vector2 DefaultDragGhostSize = new Vector2(64f, 64f); [SerializeField] private RepoItemContext _context; @@ -74,12 +76,24 @@ namespace GeometryTD.UI public void SetSelected(bool isSelected) { _isSelected = isSelected; - if (_highlightImage == null) + RefreshBackgroundColor(); + } + + private void RefreshBackgroundColor() + { + if (_bgImage == null) { return; } - _highlightImage.color = isSelected ? SelectedColor : NormalColor; + if (_isSelected) + { + _bgImage.color = SelectedColor; + return; + } + + float enduranceRate = _context != null ? Mathf.Clamp01(_context.EnduranceRate01) : 1f; + _bgImage.color = Color.Lerp(EmptyEnduranceColor, FullEnduranceColor, enduranceRate); } public void OnClick() diff --git a/Assets/GameMain/Scripts/Utility/ItemDescUtility.cs b/Assets/GameMain/Scripts/Utility/ItemDescUtility.cs index 63c6e56..c475f05 100644 --- a/Assets/GameMain/Scripts/Utility/ItemDescUtility.cs +++ b/Assets/GameMain/Scripts/Utility/ItemDescUtility.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Text; using GeometryTD.Definition; @@ -54,6 +55,73 @@ namespace GeometryTD.CustomUtility return sb.ToString(); } + public static string BuildTowerDesc( + TowerItemData tower, + IReadOnlyDictionary muzzleMap, + IReadOnlyDictionary bearingMap, + IReadOnlyDictionary baseMap) + { + if (tower == null) + { + return string.Empty; + } + + StringBuilder sb = new StringBuilder(); + sb.Append(BuildTowerDesc(tower.Stats ?? new TowerStatsData())); + float enduranceRate = ResolveTowerEnduranceRate(tower, muzzleMap, bearingMap, baseMap); + sb.AppendLine($"平均耐久: {enduranceRate * 100f:0.#}"); + return sb.ToString(); + } + + public static float ResolveComponentEnduranceRate(TowerCompItemData item) + { + if (item == null) + { + return 1f; + } + + return UnityEngine.Mathf.Clamp01(item.Endurance / 100f); + } + + public static float ResolveTowerEnduranceRate( + TowerItemData tower, + IReadOnlyDictionary muzzleMap, + IReadOnlyDictionary bearingMap, + IReadOnlyDictionary baseMap) + { + if (tower == null) + { + return 1f; + } + + float sum = 0f; + int count = 0; + if (muzzleMap != null && muzzleMap.TryGetValue(tower.MuzzleComponentInstanceId, out MuzzleCompItemData muzzle)) + { + sum += ResolveComponentEnduranceRate(muzzle); + count++; + } + + if (bearingMap != null && bearingMap.TryGetValue(tower.BearingComponentInstanceId, out BearingCompItemData bearing)) + { + sum += ResolveComponentEnduranceRate(bearing); + count++; + } + + if (baseMap != null && baseMap.TryGetValue(tower.BaseComponentInstanceId, out BaseCompItemData baseComp)) + { + sum += ResolveComponentEnduranceRate(baseComp); + count++; + } + + if (count <= 0) + { + return 1f; + } + + return UnityEngine.Mathf.Clamp01(sum / count); + } + public static string BuildMuzzleDesc(MuzzleCompItemData muzzleData) { StringBuilder sb = new StringBuilder(); @@ -66,9 +134,11 @@ namespace GeometryTD.CustomUtility } sb.Append('\n'); - sb.Append($"伤害浮动:{muzzleData.DamageRandomRate:P0}\n"); + sb.AppendLine($"伤害浮动:{muzzleData.DamageRandomRate:P0}"); - sb.Append($"攻击方式:{ConvertAttackMethod(muzzleData.AttackMethodType)}\n"); + sb.AppendLine($"攻击方式:{ConvertAttackMethod(muzzleData.AttackMethodType)}"); + + sb.AppendLine($"当前耐久:{muzzleData.Endurance}"); return sb.ToString(); } @@ -93,6 +163,8 @@ namespace GeometryTD.CustomUtility } sb.Append('\n'); + sb.AppendLine($"当前耐久:{bearingData.Endurance}"); + return sb.ToString(); } @@ -108,7 +180,9 @@ namespace GeometryTD.CustomUtility } sb.Append('\n'); - sb.Append($"伤害属性:{ConvertAttackProperty(baseData.AttackPropertyType)}\n"); + sb.AppendLine($"伤害属性:{ConvertAttackProperty(baseData.AttackPropertyType)}"); + + sb.AppendLine($"当前耐久:{baseData.Endurance}"); return sb.ToString(); } @@ -118,7 +192,7 @@ namespace GeometryTD.CustomUtility return type switch { AttackMethodType.None => "无效", - AttackMethodType.NormalBullet => "发射子弹", + AttackMethodType.NormalBullet => "发送子弹", AttackMethodType.Range => "范围攻击", _ => throw new ArgumentOutOfRangeException(nameof(type), type, null) }; @@ -131,7 +205,7 @@ namespace GeometryTD.CustomUtility AttackPropertyType.None => "无效", AttackPropertyType.Physics => "物理", //yellow AttackPropertyType.Fire => "火", //red - AttackPropertyType.Water => "水", //cyan + AttackPropertyType.Water => "水/color>", //cyan AttackPropertyType.Earth => "自然", //lime AttackPropertyType.Poison => "毒", //green AttackPropertyType.Ice => "冰", //darkblue @@ -139,4 +213,6 @@ namespace GeometryTD.CustomUtility }; } } -} \ No newline at end of file +} + + diff --git a/Assets/GameMain/UI/UIForms/ItemDescForm.prefab b/Assets/GameMain/UI/UIForms/ItemDescForm.prefab index 87aa4a8..6df4570 100644 --- a/Assets/GameMain/UI/UIForms/ItemDescForm.prefab +++ b/Assets/GameMain/UI/UIForms/ItemDescForm.prefab @@ -59,9 +59,9 @@ MonoBehaviour: _tagItemPrefab: {fileID: 2724990199440728093, guid: b8cf55567ed692c439cc016211a19ded, type: 3} _autoResizeHeight: 1 - _fixedTopHeight: 180 - _fixedBottomHeight: 400 - _fixedWidth: 600 + _fixedTopHeight: 300 + _fixedBottomHeight: 200 + _fixedWidth: 800 _screenEdgePadding: 0 _sideGap: 16 _anchorItemWidth: 0 @@ -101,8 +101,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 0, y: 150} - m_SizeDelta: {x: 540, y: 100} + m_AnchoredPosition: {x: 0, y: 130} + m_SizeDelta: {x: 740, y: 50} m_Pivot: {x: 0.5, y: 0} --- !u!114 &1667346964111373606 MonoBehaviour: @@ -122,8 +122,8 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 0 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 + m_Spacing: 10 + m_ChildForceExpandWidth: 0 m_ChildForceExpandHeight: 1 m_ChildControlWidth: 0 m_ChildControlHeight: 0 @@ -171,7 +171,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: -500} - m_SizeDelta: {x: 600, y: 1000} + m_SizeDelta: {x: 800, y: 1000} m_Pivot: {x: 0.5, y: 0} --- !u!222 &3996340794476105959 CanvasRenderer: @@ -194,7 +194,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.078431375, g: 0.078431375, b: 0.078431375, a: 0.78431374} + m_Color: {r: 0.078431375, g: 0.078431375, b: 0.078431375, a: 0.9019608} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -257,9 +257,9 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 280, y: -80} - m_SizeDelta: {x: 500, y: 80} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 30, y: -50} + m_SizeDelta: {x: 500, y: 100} + m_Pivot: {x: 0, y: 1} --- !u!222 &3590733437255178557 CanvasRenderer: m_ObjectHideFlags: 0 @@ -316,8 +316,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 50 - m_fontSizeBase: 50 + m_fontSize: 60 + m_fontSizeBase: 60 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -392,9 +392,9 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 280, y: -147.5} - m_SizeDelta: {x: 500, y: 55} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 30, y: -150} + m_SizeDelta: {x: 500, y: 80} + m_Pivot: {x: 0, y: 1} --- !u!222 &6203466971508003467 CanvasRenderer: m_ObjectHideFlags: 0 @@ -451,8 +451,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 40 - m_fontSizeBase: 40 + m_fontSize: 50 + m_fontSizeBase: 50 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -527,8 +527,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -200} - m_SizeDelta: {x: 540, y: 500} + m_AnchoredPosition: {x: 0.00000036508, y: -250} + m_SizeDelta: {x: 740, y: 500} m_Pivot: {x: 0.5, y: 1} --- !u!222 &4798810177026917072 CanvasRenderer: @@ -586,8 +586,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 32 - m_fontSizeBase: 32 + m_fontSize: 45 + m_fontSizeBase: 45 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -663,7 +663,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} m_AnchoredPosition: {x: 0, y: 30} - m_SizeDelta: {x: 540, y: 60} + m_SizeDelta: {x: 740, y: 80} m_Pivot: {x: 0.5, y: 0} --- !u!222 &3799867405260183227 CanvasRenderer: @@ -721,8 +721,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 32 - m_fontSizeBase: 32 + m_fontSize: 40 + m_fontSizeBase: 40 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -919,7 +919,8 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 1920576543566152029, guid: 2307f223279813546a43b221ddd496cc, type: 3} - m_RemovedGameObjects: [] + m_RemovedGameObjects: + - {fileID: 7607456171798064113, guid: 2307f223279813546a43b221ddd496cc, type: 3} m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 2307f223279813546a43b221ddd496cc, type: 3} diff --git a/Assets/GameMain/UI/UIItems/RepoItem.prefab b/Assets/GameMain/UI/UIItems/RepoItem.prefab index 2b04836..cd133a4 100644 --- a/Assets/GameMain/UI/UIItems/RepoItem.prefab +++ b/Assets/GameMain/UI/UIItems/RepoItem.prefab @@ -1,5 +1,151 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &1829080121932840176 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6631017172896763851} + - component: {fileID: 8861241728242575540} + - component: {fileID: 4970081361898877289} + m_Layer: 5 + m_Name: Endurance + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6631017172896763851 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1829080121932840176} + 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: 1975505172905695105} + 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 &8861241728242575540 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1829080121932840176} + m_CullTransparentMesh: 1 +--- !u!114 &4970081361898877289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1829080121932840176} + 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: ab45c3f613f388d43bbf43ec05eb92e2, type: 3} + m_Type: 3 + 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!1 &1986535686859415272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3419514439234906529} + - component: {fileID: 2977489106295363304} + m_Layer: 5 + m_Name: CommonButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3419514439234906529 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986535686859415272} + 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: 3019332808043485078} + m_Father: {fileID: 1975505172905695105} + 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!114 &2977489106295363304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1986535686859415272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5079836f95c2a44b96fa331487ebb70, type: 3} + m_Name: + m_EditorClassIdentifier: + _onHover: + m_PersistentCalls: + m_Calls: [] + _onClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8394974685918372820} + m_TargetAssemblyTypeName: GeometryTD.UI.RepoItem, Assembly-CSharp + m_MethodName: OnClick + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 10001 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _onHoverEnd: + m_PersistentCalls: + m_Calls: [] + _allowFade: 1 --- !u!1 &8845098964186727177 GameObject: m_ObjectHideFlags: 0 @@ -31,13 +177,14 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 3419514439234906529} + - {fileID: 6631017172896763851} - {fileID: 5601911972039586724} m_Father: {fileID: 0} 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: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &617747730667399833 CanvasRenderer: @@ -59,201 +206,92 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ba332072a148499b8f6ec886c661c00f, type: 3} m_Name: m_EditorClassIdentifier: - _highlightImage: {fileID: 269831324452536459} + _bgImage: {fileID: 269831324452536459} _iconArea: {fileID: 321755258514039240} ---- !u!1001 &1234001823675854678 -PrefabInstance: + _context: + InstanceId: 0 + CanDrag: 0 + ComponentSlotType: 0 + IconAreaContext: + Rarity: 0 + ComponentSlotType: 0 + Color: {r: 1, g: 1, b: 1, a: 1} + Icon: {fileID: 0} +--- !u!1 &8960640930694294173 +GameObject: m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1975505172905695105} - m_Modifications: - - target: {fileID: 770565994539545022, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Name - value: CommonButton - objectReference: {fileID: 0} - - target: {fileID: 1341699087252484061, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: 9f847ec5e66e03e4ead1d3c5f7b510e8, - type: 3} - - target: {fileID: 1341699087252484061, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Color.b - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 1341699087252484061, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Color.g - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 1341699087252484061, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Color.r - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.size - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 8394974685918372820} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: OnClick - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName - value: GeometryTD.UI.RepoItem, Assembly-CSharp - objectReference: {fileID: 0} - - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName - value: UnityEngine.Object, UnityEngine - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: - - {fileID: 7607456171798064113, guid: 2307f223279813546a43b221ddd496cc, type: 3} - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 2307f223279813546a43b221ddd496cc, type: 3} ---- !u!114 &269831324452536459 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 1341699087252484061, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - m_PrefabInstance: {fileID: 1234001823675854678} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3019332808043485078} + - component: {fileID: 5969284969000671853} + - component: {fileID: 269831324452536459} + m_Layer: 5 + m_Name: board + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3019332808043485078 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8960640930694294173} + 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: 3419514439234906529} + 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 &5969284969000671853 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8960640930694294173} + m_CullTransparentMesh: 1 +--- !u!114 &269831324452536459 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8960640930694294173} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &3419514439234906529 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, - type: 3} - m_PrefabInstance: {fileID: 1234001823675854678} - m_PrefabAsset: {fileID: 0} + m_Material: {fileID: 0} + m_Color: {r: 0.5, g: 0.5, b: 0.5, 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: 9f847ec5e66e03e4ead1d3c5f7b510e8, type: 3} + m_Type: 1 + 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!1001 &3424972329100414378 PrefabInstance: m_ObjectHideFlags: 0