烂尾
timeline居然没看懂,那个点击估计得重写 这种要怎么侦测呀
This commit is contained in:
@@ -24,7 +24,8 @@ namespace Ichni.Editor
|
||||
public float intervalUnit;
|
||||
public float timePointerInterval;
|
||||
public float sizeNegative, sizePositive;
|
||||
public int negativePointerAmount, positivePointerAmount, totalPointerAmount;
|
||||
public int negativePointerAmount; // 负方向指示线的数量
|
||||
public int positivePointerAmount, totalPointerAmount;
|
||||
/// <summary>
|
||||
/// delay时间区间中,(-delay, 0)的距离偏移量
|
||||
/// </summary>
|
||||
@@ -71,9 +72,12 @@ namespace Ichni.Editor
|
||||
intervalUnit = (60f / bpm) / beatDivider * 1000;
|
||||
|
||||
sizeNegative = delay * beatDivider / timeline.timePerBeat;
|
||||
|
||||
// 计算负方向指示线的数量
|
||||
negativePointerAmount = Mathf.CeilToInt(sizeNegative);
|
||||
|
||||
sizePositive = songInformation.song.length * beatDivider / timeline.timePerBeat;
|
||||
|
||||
negativePointerAmount = Mathf.CeilToInt(sizeNegative);
|
||||
positivePointerAmount = Mathf.CeilToInt(sizePositive);
|
||||
|
||||
totalPointerAmount = negativePointerAmount + positivePointerAmount;
|
||||
@@ -143,9 +147,13 @@ namespace Ichni.Editor
|
||||
/// </summary>
|
||||
public void UpdatePointers()
|
||||
{
|
||||
// 计算延迟距离偏移量
|
||||
delayDistanceOffset = timePointerInterval * (negativePointerAmount - sizeNegative);
|
||||
|
||||
// 更新指示线区域的大小
|
||||
timePointerArea.sizeDelta = new Vector2(timePointerInterval * totalPointerAmount, 55f);
|
||||
|
||||
// 更新每个指示线的位置
|
||||
foreach (var pointer in timePointerList)
|
||||
{
|
||||
pointer.GetComponent<RectTransform>().anchoredPosition =
|
||||
|
||||
Reference in New Issue
Block a user