mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-21 01:36:05 +08:00
27 lines
572 B
C#
27 lines
572 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using DG.Tweening;
|
|
|
|
public class IndexOutOfRange02 : BrainBase
|
|
{
|
|
public Transform[] targets;
|
|
|
|
IEnumerator Start()
|
|
{
|
|
DOTween.Init (true, false, LogBehaviour.ErrorsOnly).SetCapacity (1000, 100);
|
|
DOTween.defaultAutoPlay = AutoPlay.None;
|
|
DOTween.defaultAutoKill = false;
|
|
yield return new WaitForSeconds(1);
|
|
|
|
foreach (Transform t in targets) t.DOMoveX(10, 10).Play();
|
|
yield return new WaitForSeconds(2);
|
|
|
|
DOTween.Clear(true);
|
|
}
|
|
|
|
void OnDestroy()
|
|
{
|
|
DOTween.Clear(true);
|
|
}
|
|
} |