lvjincheng 3 years ago
parent
commit
9f6b4e256f
1 changed files with 11 additions and 0 deletions
  1. 11 0
      Assets/BowArrow/Scripts/Game/CrossHair.cs

+ 11 - 0
Assets/BowArrow/Scripts/Game/CrossHair.cs

@@ -35,6 +35,17 @@ public class CrossHair : MonoBehaviour
         this.GetComponent<Image>().enabled = this.visiable;
         this.GetComponent<Image>().enabled = this.visiable;
     }
     }
 
 
+    public void SetOpen(bool open) {
+        this.open = open;
+        if (!this.open) {
+            SetVisiable(false);
+        }
+    }
+
+    public bool GetOpen() {
+        return this.open;
+    }
+
     public RaycastHit GetRaycastHit() {
     public RaycastHit GetRaycastHit() {
         float maxDistance = 100;
         float maxDistance = 100;
         int layerMask = 1 << 8;
         int layerMask = 1 << 8;