烂尾
timeline居然没看懂,那个点击估计得重写 这种要怎么侦测呀
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user