烂尾
timeline居然没看懂,那个点击估计得重写 这种要怎么侦测呀
This commit is contained in:
@@ -9,15 +9,34 @@ public class TimelineTab : MonoBehaviour
|
||||
{
|
||||
public TMP_Text Title;
|
||||
public GameElement connectedGameElement;
|
||||
|
||||
public SubTab ElementPrefab;
|
||||
public List<GameElement> GelementPointer;
|
||||
|
||||
public Dictionary<float, SubTab> SubTabs = new();
|
||||
public void SetTab(GameElement element, Type DisplayType)
|
||||
{
|
||||
connectedGameElement = element;
|
||||
Title.text = DisplayType.ToString();
|
||||
foreach (var i in element.childElementList) if (i.GetType() == DisplayType) GelementPointer.Add(i);
|
||||
|
||||
AddElement(element);
|
||||
}
|
||||
public void AddElement(GameElement gameElement)
|
||||
{
|
||||
|
||||
GelementPointer.Add(gameElement);
|
||||
if (gameElement is NoteBase)
|
||||
{
|
||||
float Judgetime = ((NoteBase)gameElement).exactJudgeTime;
|
||||
print(Judgetime);
|
||||
|
||||
if (SubTabs.ContainsKey(Judgetime)) SubTabs[Judgetime].Set(gameElement, Judgetime);
|
||||
else
|
||||
{
|
||||
SubTab i = Instantiate(ElementPrefab, transform);
|
||||
i.Set(gameElement, Judgetime);
|
||||
SubTabs.Add(Judgetime, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user