FM/Assets/Scripts/Runtime/Model/NotebookModelBar.cs

28 lines
664 B
C#
Raw Normal View History

2025-07-08 22:07:35 +08:00
using System;
using System.Collections.Generic;
2025-07-02 10:24:01 +08:00
using DG.Tweening;
using UnityEngine;
2025-07-08 22:07:35 +08:00
using ZGame;
2025-07-02 10:24:01 +08:00
namespace Runtime
{
public class NotebookModelBar : MonoBehaviour
{
[SerializeField] List<Vector3> positions = new List<Vector3>();
[SerializeField] Transform model;
2025-07-08 22:07:35 +08:00
[SerializeField] float doTweenTime = 1f;
2025-07-02 10:24:01 +08:00
// [SerializeField] private int index;
2025-07-08 22:07:35 +08:00
private void Awake()
{
}
2025-07-02 10:24:01 +08:00
[ContextMenu("TestPlay")]
public void PlayIndex(int index)
{
if (index >= 0 && index < positions.Count)
2025-07-08 22:07:35 +08:00
model.DOLocalMove(positions[index], doTweenTime);
2025-07-02 10:24:01 +08:00
}
}
}