mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-21 01:36:05 +08:00
20 lines
469 B
C#
20 lines
469 B
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class PathsFree : BrainBase
|
|
{
|
|
public Transform target;
|
|
public Ease ease = Ease.Linear;
|
|
public PathType pathType;
|
|
public bool closePath;
|
|
public Vector3[] waypoints;
|
|
|
|
IEnumerator Start()
|
|
{
|
|
yield return new WaitForSeconds(1);
|
|
|
|
target.DOPath(waypoints, 3f, pathType).SetOptions(closePath).SetEase(ease)
|
|
.OnWaypointChange(x=> Debug.Log("CHANGE > " + x + " - " + target.position));
|
|
}
|
|
} |