暂存:动画曲线
还没搞完,复制粘贴也没有
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Ichni.Editor
|
||||
|
||||
public RectTransform timePointerArea;
|
||||
public RectTransform visibleTimePointerArea;
|
||||
|
||||
public RectTransform moveTabPoint;//用于显示timeline上的tab
|
||||
public RectTransform mainTimePointer;
|
||||
|
||||
public float intervalUnit;
|
||||
@@ -47,13 +47,28 @@ namespace Ichni.Editor
|
||||
if (EditorManager.instance.musicPlayer.isPlaying)
|
||||
{
|
||||
SetRange(songInformation.songTime);
|
||||
|
||||
}
|
||||
|
||||
moveTabPoint.localPosition = new Vector3(timePointerArea.localPosition.x + OnePointer.transform.localPosition.x - timePointerInterval, -45f, 0);
|
||||
|
||||
timePointerList.ForEach(pointer =>
|
||||
{
|
||||
bool isActive = pointer.time >= leftSideSongTime && pointer.time <= rightSideSongTime;
|
||||
pointer.gameObject.SetActive(isActive);
|
||||
});
|
||||
foreach (var i in moveTabPoint.transform.GetComponentsInChildren<SubTab>())
|
||||
{
|
||||
if (i.Time >= songInformation.songTime)
|
||||
{
|
||||
i.transform.localScale = new Vector3(1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
i.transform.localScale = new Vector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -124,7 +139,7 @@ namespace Ichni.Editor
|
||||
/// </summary>
|
||||
/// <param name="beatDivider">细分X分音符</param>
|
||||
/// <param name="index"></param>
|
||||
|
||||
TimePointer OnePointer = null;
|
||||
private void CreatePointer(int beatDivider, int index)
|
||||
{
|
||||
TimePointer pointer = Instantiate(timePointerPrefab, timePointerArea).GetComponent<TimePointer>();
|
||||
@@ -136,6 +151,10 @@ namespace Ichni.Editor
|
||||
|
||||
pointer.time = index * intervalUnit / 1000f;
|
||||
pointer.intervalUnitText.text = Mathf.RoundToInt(index * intervalUnit).ToString();
|
||||
if (index == 0)
|
||||
{
|
||||
OnePointer = timePointerList[timePointerList.Count - 1];
|
||||
}
|
||||
if (beatDivider > 1)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user