优化动画

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-24 21:47:19 +08:00
parent 7995cab04a
commit b0e0a7d5aa
32 changed files with 2953 additions and 1256 deletions

View File

@@ -10,15 +10,15 @@ namespace Ichni.UI
{
public ValueModifier valueModifier;
public RectTransform sliderBackground;
public void OnPointerClick(PointerEventData eventData)
{
valueModifier.SetValue(valueModifier.GetNearestValue(GetPercentage(eventData.position)));
valueModifier.SetValue(valueModifier.GetNearestValue(GetPercentage(eventData.position)), true);
}
public void OnDrag(PointerEventData eventData)
{
valueModifier.SetValue(valueModifier.GetNearestValue(GetPercentage(eventData.position)));
valueModifier.SetValue(valueModifier.GetNearestValue(GetPercentage(eventData.position)), true);
}
private float GetPercentage(Vector2 inputPosition)
@@ -46,7 +46,7 @@ namespace Ichni.UI
return percentage;
}
return 0f;
}
}