18 lines
497 B
C#
18 lines
497 B
C#
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);
|
|
}
|
|
} |