ClientServer/Client/Assets/Scripts/UI/Forge/ForgeButtonTween.cs

18 lines
497 B
C#
Raw Normal View History

2025-09-06 17:17:39 +04:00
using System;
using UnityEngine;
using DG.Tweening;
using UnityEngine.UIElements;
public class ForgeButtonTween : MonoBehaviour
{
private const float anchoredRestingPosition = 0f;
private RectTransform trans => transform as RectTransform;
private void OnEnable()
{
Vector2 temp = trans.anchoredPosition;
temp.x = -2000;
trans.anchoredPosition = temp;
trans.DOAnchorPosX(anchoredRestingPosition, 0.3f).SetEase(Ease.OutBack).SetUpdate(true);
}
}