我需要帮助😭
timeline下面的子菜单不知道怎么适配比例 还有性能不是很好(TimeLineTabS)下面的一坨
This commit is contained in:
@@ -12,12 +12,13 @@ public class SubTab : MonoBehaviour
|
||||
{
|
||||
public List<GameElement> connectObj = new();
|
||||
public Button button;
|
||||
//private SongInformation songInformation = EditorManager.instance.songInformation;
|
||||
private SongInformation songInformation;
|
||||
private TimePointerModule timePointerModule;
|
||||
private Timeline timeline;
|
||||
public float Time;
|
||||
public void Set(GameElement Objs, float time)
|
||||
{
|
||||
songInformation = EditorManager.instance.songInformation;
|
||||
timePointerModule = EditorManager.instance.uiManager.timeline.timePointerModule;
|
||||
timeline = EditorManager.instance.uiManager.timeline;
|
||||
Time = time;
|
||||
@@ -26,10 +27,20 @@ public class SubTab : MonoBehaviour
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
|
||||
|
||||
Vector3 newPOs = B2P(Time);
|
||||
transform.position = newPOs;
|
||||
if (Time - timePointerModule.leftSideSongTime < 0)
|
||||
{
|
||||
transform.localScale = Vector3.zero;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.localScale = Vector3.one;
|
||||
float devideTime = Time - timePointerModule.leftSideSongTime;
|
||||
transform.position = new Vector3(
|
||||
devideTime / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset
|
||||
, transform.position.y, 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public void GetClick()
|
||||
@@ -37,10 +48,4 @@ public class SubTab : MonoBehaviour
|
||||
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