TimeLine大改

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-07-18 18:43:09 +08:00
parent fc3b4d7207
commit 1b5084626d
29 changed files with 16837 additions and 17453 deletions

View File

@@ -51,6 +51,11 @@ public class EventPoint : MonoBehaviour
}
public float value => FatherTab.scalevalue;
public void Refresh()
{
ReDraw(value);
UpdateValue();
}
public void ReDraw(float value)
{
@@ -130,13 +135,7 @@ public class EventPoint : MonoBehaviour
}
private void Update()
{
if (RectTransformUtility.RectangleContainsScreenPoint(CurveCanvas.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
{
}
}
public void SelectButtonClick()//unity内当按钮按下时
{
if (Keyboard.current.leftShiftKey.isPressed)
@@ -187,7 +186,12 @@ public class EventPoint : MonoBehaviour
FatherTab.FatherWindow.ConnectedPoint.EvDrawimage.color.b, 0.5f
);
}
UpdateValue();
}
private void UpdateValue()
{
// 设置新的连接点并更新UI
FatherTab.FatherWindow.ConnectedPoint = this;
EvDrawimage.color = new Color(EvDrawimage.color.r, 0.75f, EvDrawimage.color.b, 1f);
@@ -208,7 +212,6 @@ public class EventPoint : MonoBehaviour
FatherTab.FatherWindow.animationCurveTypeDropdown.onValueChanged.AddListener(value => FatherTab.FatherWindow.ChangeValue());
}
// 添加静态方法:查找插入索引
public static int FindInsertIndex(List<EventPoint> eventPoints, float startTime)
{