1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00
2015-10-31 16:37:11 +01:00

24 lines
592 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 = 16;
public float period = 1;
public void Play()
{
DOTween.RewindAll();
DOTween.KillAll();
imgFlash.DOColor(flashColor, duration).SetEase(ease, overshootOrAmplitude, period);
imgSmoothFlash.DOColor(flashColor, duration).SetEase(ease, overshootOrAmplitude - 1, period);
}
}