2025-12-12 15:19:10 +08:00
|
|
|
using Convention;
|
|
|
|
|
using Convention.WindowsUI.Variant;
|
|
|
|
|
using Demo.Attr;
|
2025-09-25 19:04:05 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Demo.Game
|
|
|
|
|
{
|
2025-12-12 15:19:10 +08:00
|
|
|
[Scriptable]
|
2025-09-25 19:04:05 +08:00
|
|
|
public class TickMovement : Updatement<Vector3>
|
|
|
|
|
{
|
|
|
|
|
public static TickMovement Make()
|
|
|
|
|
{
|
|
|
|
|
return new GameObject().AddComponent<TickMovement>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override Vector3 Lerp(Vector3 begin, Vector3 end, float t)
|
|
|
|
|
{
|
|
|
|
|
return Vector3.Lerp(begin, end, t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void UpdateData(Vector3 data)
|
|
|
|
|
{
|
|
|
|
|
UpdateTarget.transform.localPosition = data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 新增
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="time">插值时间</param>
|
|
|
|
|
/// <param name="x">x</param>
|
|
|
|
|
/// <param name="y">y</param>
|
|
|
|
|
/// <param name="z">z</param>
|
2025-11-24 18:02:57 +08:00
|
|
|
/// <param name="curveType">缓动曲线</param>
|
2025-10-27 20:24:15 +08:00
|
|
|
[Convention.RScript.Variable.Attr.Method]
|
2025-11-24 18:02:57 +08:00
|
|
|
public void Add(float time, float x, float y, float z, MathExtension.EaseCurveType curveType)
|
2025-09-25 19:04:05 +08:00
|
|
|
{
|
2025-11-24 18:02:57 +08:00
|
|
|
ManualAddEntry(time, new(x, y, z), curveType);
|
2025-09-25 19:04:05 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|