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