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

28 lines
664 B
C#

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