部分改动
我还是难以理解(
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class TimelineTab : MonoBehaviour
|
||||
@@ -13,7 +16,10 @@ public class TimelineTab : MonoBehaviour
|
||||
public SubTab ElementPrefab;
|
||||
public List<GameElement> GelementPointer;
|
||||
|
||||
public RectTransform MoveArea;
|
||||
public Dictionary<float, SubTab> SubTabs = new();
|
||||
|
||||
public Timeline timeline;
|
||||
public void SetTab(GameElement element, Type DisplayType)
|
||||
{
|
||||
connectedGameElement = element;
|
||||
@@ -33,11 +39,22 @@ public class TimelineTab : MonoBehaviour
|
||||
if (SubTabs.ContainsKey(Judgetime)) SubTabs[Judgetime].Set(gameElement, Judgetime);
|
||||
else
|
||||
{
|
||||
SubTab i = Instantiate(ElementPrefab, transform);
|
||||
SubTab i = Instantiate(ElementPrefab, MoveArea.transform);
|
||||
|
||||
i.Set(gameElement, Judgetime);
|
||||
SubTabs.Add(Judgetime, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
timeline = EditorManager.instance.uiManager.timeline;
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
MoveArea.position = new Vector3(
|
||||
timeline.timePointerModule.timePointerArea.position.x,
|
||||
MoveArea.position.y,
|
||||
MoveArea.position.z);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user