hellbound/Assets/Scripts/Game/UI/Effects/UiEffectRotate.cs

20 lines
557 B
C#
Raw Permalink Normal View History

2021-11-26 11:16:25 +03:00
using System;
using DG.Tweening;
using UnityEngine;
public class UiEffectRotate : MonoBehaviour
{
[SerializeField] private float loopTime;
[SerializeField] private float loopDelay;
[SerializeField] private Ease easing = Ease.Linear;
private void Start()
{
Sequence seq = DOTween.Sequence();
seq.AppendInterval(loopDelay);
seq.Append(transform.DOLocalRotate(Vector3.forward * 360, loopTime, RotateMode.FastBeyond360)).SetEase(easing);
seq.SetLoops(-1).SetAutoKill(false);
seq.Play();
}
}