mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 17:26:03 +08:00
22 lines
319 B
C#
22 lines
319 B
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
|
|
public class PersistentComponent : BrainBase
|
|
{
|
|
public Transform target;
|
|
|
|
void OnDestroy()
|
|
{
|
|
Debug.Log("OnDestroy > Create tween");
|
|
target.DOMoveX(3, 1);
|
|
}
|
|
|
|
void OnGUI()
|
|
{
|
|
DGUtils.BeginGUI();
|
|
|
|
if (GUILayout.Button("Init")) DOTween.Init();
|
|
|
|
DGUtils.EndGUI();
|
|
}
|
|
} |