1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 09:16:02 +08:00
2015-10-30 21:31:04 +01:00

23 lines
546 B
C#

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using DG.Tweening;
public class EaseX : MonoBehaviour
{
public Image imgFlash, imgSmoothFlash;
public Color flashColor;
[Header("Tween Settings")]
public float duration = 2;
public Ease ease;
public float overshootOrAmplitude = 10;
public void Play()
{
DOTween.RewindAll();
DOTween.KillAll();
imgFlash.DOColor(flashColor, duration).SetEase(ease, overshootOrAmplitude);
imgSmoothFlash.DOColor(flashColor, duration).SetEase(ease, overshootOrAmplitude);
}
}