1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 17:26:03 +08:00

22 lines
488 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class IndexOutOfRangeOnKill : BrainBase
{
IEnumerator Start()
{
transform.DOScale(Vector3.zero, 1000).OnKill(() => transform.gameObject.SetActive(false));
yield return new WaitForSeconds(1.5f);
transform.DOKill();
Debug.Log("START COMPLETION");
}
void OnDisable()
{
Debug.Log("DISABLE");
transform.DOKill();
}
}