Browse Source

Update PathSign.cs

wartheking 6 months ago
parent
commit
10880c0955
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Assets/PathSign.cs

+ 3 - 1
Assets/PathSign.cs

@@ -15,8 +15,10 @@ public class PathSign : MonoBehaviour
         if (bindObj != null)
         {
             this.GetComponent<RectTransform>().anchoredPosition = CameraManager.instance.secondCamera.WorldToScreenPoint(bindPos) / Screen.width * 1920.0f;
+            float alpha = this.GetComponent<RectTransform>().anchoredPosition.y < 1000 ? 1 : (1 - (this.GetComponent<RectTransform>().anchoredPosition.y - 1000) / 16);
+            this.GetComponent<Image>().color = new Color(1, 1, 1, alpha);
             float dyScale = 72 / CameraManager.instance.secondCamera.GetComponent<CameraBirdSec>().currentDistance;
-            dyScale = math.clamp(dyScale, 1, 6);
+            dyScale = math.clamp(dyScale, 1, 4);
             this.transform.localScale = new Vector3(dyScale, dyScale, dyScale);
             if (!bindObj.activeSelf || !bindObj.transform.parent.gameObject.activeSelf || !bindObj.transform.parent.parent.gameObject.activeSelf)
             {