game over UI done, rematch left
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using DG.Tweening;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
[RequireComponent(typeof(TMP_Text))]
|
||||
public class TextBlinker : MonoBehaviour
|
||||
{
|
||||
public float duration = 0.5f;
|
||||
public Ease ease = Ease.InOutSine;
|
||||
public float from = 0f;
|
||||
public float to = 1f;
|
||||
public int loops = -1;
|
||||
public LoopType loopType = LoopType.Yoyo;
|
||||
|
||||
void Start()
|
||||
{
|
||||
var txt = GetComponent<TMP_Text>();
|
||||
var c = txt.color;
|
||||
c.a = from;
|
||||
txt.color = c;
|
||||
txt.DOFade(to, duration).SetEase(ease).SetLoops(loops, loopType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user