修改名牌穿透UI问题,显示门

This commit is contained in:
康地林 2023-09-18 15:44:41 +08:00
parent 5b894d0d95
commit 5d53aa851f
4 changed files with 8 additions and 20 deletions

View File

@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class ShowNameplate : MonoBehaviour
{
@ -15,8 +16,11 @@ public class ShowNameplate : MonoBehaviour
private void OnMouseDown()
{
if (EventSystem.current.IsPointerOverGameObject())
{
return;
}
NameplateController.Instance.RefreshShown();
if (!NameplateController.Instance.DictextMeshPro.ContainsKey(myName))
{
return;

View File

@ -10137,7 +10137,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -491602864608504868, guid: 6fbd9caa46e05824fb3eba389c7d1b27, type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: -491602864608504868, guid: 6fbd9caa46e05824fb3eba389c7d1b27, type: 3}
propertyPath: m_TagString

View File

@ -26,13 +26,10 @@ public class MultimeterManager : MonoBehaviour
{
// 从相机位置发射一条射线经过屏幕上的鼠标点击位置
Ray ray = Camera.ScreenPointToRay(Input.mousePosition);
// 声明一个射线碰撞信息类
RaycastHit hit;
// 进行碰撞检测
bool res = Physics.Raycast(ray, out hit, 1 << 7) && !EventSystem.current.IsPointerOverGameObject();
if (res)
{
// 如果产生了碰撞

View File

@ -41,7 +41,6 @@ public class ClampAmmetersManager : MonoBehaviour
if (clampAmmetersInteractives[i].name.Equals("用电_AA2")|| clampAmmetersInteractives[i].name.Equals("用电_AA3"))
{
clampAmmetersInteractives[i].Fuan = Three.ttpData.data.qxA;
Debug.Log(Three.ttpData.data.qxA + "====Three.ttpData.data.qxA");
}
if (clampAmmetersInteractives[i].name.Equals("用电_BA2")|| clampAmmetersInteractives[i].name.Equals("用电_BA3"))
{
@ -66,18 +65,6 @@ public class ClampAmmetersManager : MonoBehaviour
{
Multimeter[i].activation = Three.ttpData.data.dyC;
}
//if (Multimeter[i].name.Equals("Óõç_N"))
//{
// Multimeter[i].activation = Three.ttpData.data.dyC;
//}
}
}
private void Update()
{
if (Input.GetKeyDown("q"))
{
Debug.Log(Three.ttpData.data.qxA + "====Three.ttpData.data.qxA");
}
}
}