烂尾
timeline居然没看懂,那个点击估计得重写 这种要怎么侦测呀
This commit is contained in:
46
Assets/Scripts/DynamicUI/Timeline/SubTab.cs
Normal file
46
Assets/Scripts/DynamicUI/Timeline/SubTab.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SubTab : MonoBehaviour
|
||||
{
|
||||
public List<GameElement> connectObj = new();
|
||||
public Button button;
|
||||
//private SongInformation songInformation = EditorManager.instance.songInformation;
|
||||
private TimePointerModule timePointerModule;
|
||||
private Timeline timeline;
|
||||
public float Time;
|
||||
public void Set(GameElement Objs, float time)
|
||||
{
|
||||
timePointerModule = EditorManager.instance.uiManager.timeline.timePointerModule;
|
||||
timeline = EditorManager.instance.uiManager.timeline;
|
||||
Time = time;
|
||||
connectObj.Add(Objs);
|
||||
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
|
||||
|
||||
Vector3 newPOs = B2P(Time);
|
||||
transform.position = newPOs;
|
||||
}
|
||||
|
||||
public void GetClick()
|
||||
{
|
||||
EditorManager.instance.uiManager.hierarchy.FindTab(connectObj[0]);
|
||||
}
|
||||
|
||||
|
||||
public Vector3 B2P(float Time)
|
||||
{
|
||||
Vector3 i = new(Time / timeline.timePerBeat * timePointerModule.timePointerInterval + 15f - timePointerModule.delayDistanceOffset + 150, transform.position.y, 0);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user