timeline居然没看懂,那个点击估计得重写
这种要怎么侦测呀
This commit is contained in:
2025-02-21 19:36:03 +08:00
parent 6781de4d53
commit 65992750b0
26 changed files with 24998 additions and 23113 deletions

View File

@@ -33,6 +33,7 @@ namespace Ichni.Editor
public void Update()
{
if (musicPlayer.isPlaying) UpdateTime();
if (RectTransformUtility.RectangleContainsScreenPoint(GetinputArea, Mouse.current.position.ReadValue()))
{
@@ -112,8 +113,35 @@ namespace Ichni.Editor
public Dictionary<Type, TimelineTab> timelineTabList = new Dictionary<Type, TimelineTab>();
public void SetTimeLine(GameElement element)
{
//在做了
for (int i = timelineTabList.Count - 1; i >= 0; i--)
{
Destroy(timelineTabList.ElementAt(i).Value.gameObject);
timelineTabList.Remove(timelineTabList.ElementAt(i).Key);
}
if (element is Track) Trackfind(element);
}
public void Trackfind(GameElement Track)
{
foreach (var i in Track.childElementList)
{
if (i is NoteBase)
{
if (!timelineTabList.ContainsKey(i.GetType()))
{
TimelineTab timelineTab = Instantiate(timelineTabPrefab, timelineTabRect.transform);
timelineTab.SetTab(i, i.GetType());
timelineTabList.Add(i.GetType(), timelineTab);
}
else
{
timelineTabList[i.GetType()].AddElement(i);
}
}
}
}
}
}