修改坡度计算逻辑,骑行界面大部分完成

This commit is contained in:
lishuo committed 2021-03-31 20:46:57 +08:00
1 parent b0f6c39118
commit eb93577d68
131 files changed
+4314 -75444

No files matched your search

@@ -26,8 +26,16 @@ public class ImageWithRoundedCorners : MonoBehaviour {
{
var rect = ((RectTransform)transform).rect;
material.SetVector(Props, new Vector4(rect.width, rect.height, radius*2, 0));
gameObject.GetComponent<Image>().material = material;
gameObject.GetComponent<Image>().sprite = null;
if (gameObject.GetComponent<Image>() != null)
{
gameObject.GetComponent<Image>().material = material;
gameObject.GetComponent<Image>().sprite = null;
}
else if (gameObject.GetComponent<RawImage>() != null)
{
gameObject.GetComponent<RawImage>().material = material;
}
}
else
{