You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/D2D_Scripts/UI/UIAnimations/SizeUIAnim.cs

22 lines
537 B
C#

1 month ago
using DG.Tweening;
using UnityEngine;
namespace D2D.UI
{
public class SizeUIAnim : UIAnim
{
[SerializeField] protected float from = 1;
[SerializeField] private float to = .9f;
[SerializeField] private bool _isRelative;
protected override void Positive()
{
transform.DOScale(to, duration).SetRelative(_isRelative);
}
protected override void Negative()
{
transform.DOScale(from, duration).SetRelative(_isRelative);
}
}
}