This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-06-26 12:50:37 +08:00
parent 149e748624
commit 4782755422
2 changed files with 4 additions and 4 deletions

View File

@ -37354,7 +37354,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: 190.32027, y: 193.92856}
m_AnchoredPosition: {x: 190.32027, y: 373}
m_SizeDelta: {x: 1080, y: 109}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3182275938344351334

View File

@ -115,7 +115,7 @@ namespace GameLogic
#endregion
private Dictionary<RectTransform, Vector2> targetPositions = new Dictionary<RectTransform, Vector2>();
private float animationSpeed = 150f; // Adjust this value to control the speed of the animation
private float animationSpeed = 200f; // Adjust this value to control the speed of the animation
protected override void OnCreate()
{
base.OnCreate();
@ -143,7 +143,7 @@ namespace GameLogic
// 计算位置
r.anchorMin = new Vector2(0.5f, 0.5f);
r.anchorMax = new Vector2(0.5f, 0.5f);
r.anchoredPosition = new Vector2(127, 175 - 65 - i * (150 - 5f));
r.anchoredPosition = new Vector2(127, 373 - 65 - i * (200 - 5f));
r.localPosition = new Vector3(r.localPosition.x, r.localPosition.y, 0);
actorHItem.OnInit(i);
DataGameSceneManager.Instance.m_DicTeamList.Add((i + 1).ToString(), actorHItem);
@ -709,7 +709,7 @@ namespace GameLogic
var hItemActor = hItemActors[i].actor;
//hItemActor.m_Index = i;
var rectTransform = hItemActor.gameObject.GetComponent<RectTransform>();
Vector2 targetPosition = new Vector2(127, 175 - i * (150 - 5f));
Vector2 targetPosition = new Vector2(127, 373 - i * (200 - 5f));
targetPositions[rectTransform] = targetPosition;
// 让UI层级与排序一致