mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-21 01:36:05 +08:00
14 lines
277 B
C#
14 lines
277 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using DG.Tweening;
|
|
|
|
public class NegativeTimeScale : MonoBehaviour
|
|
{
|
|
public Transform target;
|
|
|
|
void Start()
|
|
{
|
|
Tween t = target.DOMoveX(7, 4).SetRelative().SetLoops(-1, LoopType.Yoyo);
|
|
t.OnUpdate(()=> t.timeScale = 1);
|
|
}
|
|
} |