mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 17:26:03 +08:00
23 lines
645 B
C#
23 lines
645 B
C#
using DG.Tweening;
|
|
using DG.Tweening.Plugins;
|
|
using UnityEngine;
|
|
|
|
public class CustomPluginExampleBrain : BrainBase
|
|
{
|
|
public Transform target;
|
|
|
|
void Start()
|
|
{
|
|
// DOTween.To(()=>target.position, x=> target.position = x, new Vector3(4, 4, 0), 1.5f)
|
|
// DOTween.To(new PlugCustomPlugin(()=>target.position, x=> target.position = x, 4), 1.5f)
|
|
// .SetDelay(2).SetRelative().SetLoops(5, LoopType.Yoyo).SetAutoKill(false)
|
|
// .OnStart(()=> Debug.Log("Start"))
|
|
// .OnStepComplete(()=> Debug.Log("Step Complete"))
|
|
// .OnComplete(()=> Debug.Log("Complete"));
|
|
}
|
|
|
|
void OnGUI()
|
|
{
|
|
if (GUILayout.Button("Flip")) DOTween.FlipAll();
|
|
}
|
|
} |