开放划船机,增加阻力设置

This commit is contained in:
Caiyanpeng committed 2022-02-11 17:38:23 +08:00
1 parent c12df53c18
commit 7c1d1e797c
13 files changed
+2376 -1642

No files matched your search

+10
View File
@@ -17,6 +17,16 @@ public class PFUISlider : MonoBehaviour
text.text = $"{(f * 100).ToString("#0")}%";
});
}
public void SetValueChanged(System.Action<float> a)
{
slider = transform.GetComponent<Slider>();
slider.onValueChanged.RemoveAllListeners();
slider.onValueChanged.AddListener((f) =>
{
text.text = $"{(f * 100).ToString("#0")}%";
a.Invoke(f);
});
}
// Start is called before the first frame update
void Start()
{