修改打开背包,会触碰到后面内容的BUG
This commit is contained in:
parent
d22ae82d99
commit
a9db3f3f06
|
|
@ -28,11 +28,14 @@ namespace ToolsPack
|
||||||
[SerializeField] private Transform content;
|
[SerializeField] private Transform content;
|
||||||
[SerializeField] private Toggle tog;
|
[SerializeField] private Toggle tog;
|
||||||
|
|
||||||
|
public static bool isOpenBag = false;
|
||||||
|
|
||||||
public void OnEnable()
|
public void OnEnable()
|
||||||
{
|
{
|
||||||
// ChangePage(ModelTypeEnum.工具);
|
// ChangePage(ModelTypeEnum.工具);
|
||||||
|
|
||||||
StartCoroutine(SetToggleOnNextFrame(tog));
|
StartCoroutine(SetToggleOnNextFrame(tog));
|
||||||
|
isOpenBag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator SetToggleOnNextFrame(Toggle toggle)
|
private IEnumerator SetToggleOnNextFrame(Toggle toggle)
|
||||||
|
|
@ -48,6 +51,8 @@ namespace ToolsPack
|
||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
|
isOpenBag = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ using UnityEngine;
|
||||||
using Unity.VisualScripting;
|
using Unity.VisualScripting;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar;
|
||||||
|
using ToolsPack;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ñéµç±Ê
|
/// Ñéµç±Ê
|
||||||
|
|
@ -55,9 +56,9 @@ public class ElectricCheckPen : MonoBehaviour
|
||||||
{
|
{
|
||||||
//if (EventSystem.current.IsPointerOverGameObject())
|
//if (EventSystem.current.IsPointerOverGameObject())
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
|
|
||||||
|
if (Input.GetMouseButtonDown(0) && !ToolsPackWindowManager.isOpenBag)
|
||||||
if (Input.GetMouseButtonDown(0))
|
|
||||||
{//Camera.transform.forward
|
{//Camera.transform.forward
|
||||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
RaycastHit hit;
|
RaycastHit hit;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue