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