void UpdateInput() { if (Input.GetMouseButtonUp(0)) { m_bFire = false; } if (AutoFire) { Vector3 pos = Vector3.zero; if (Input.GetMouseButtonDown(0) && !GameFunction.IsPointerOnUI()) { pos = Input.mousePosition; } m_bFire = true; UpdateFire(pos); } else if (Input.GetMouseButton(0)) { if (!m_bFire)//非连击的情况下是否在UI上 { if (GameFunction.IsPointerOnUI()) { return; } } m_bFire = true; UpdateFire(Input.mousePosition); } m_LineImg.fillAmount = 0f; }