提交修改后的GamneManager

This commit is contained in:
康地林 2023-09-17 17:20:17 +08:00
parent 65ba84e688
commit 70b29a563e
3 changed files with 21 additions and 9 deletions

View File

@ -26674,6 +26674,11 @@ Transform:
m_CorrespondingSourceObject: {fileID: 5105344013281172883, guid: 9b54ee1e7aceeba4088aa0d3b7241aae, type: 3} m_CorrespondingSourceObject: {fileID: 5105344013281172883, guid: 9b54ee1e7aceeba4088aa0d3b7241aae, type: 3}
m_PrefabInstance: {fileID: 696764693} m_PrefabInstance: {fileID: 696764693}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &696764695 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5589534452104218409, guid: 9b54ee1e7aceeba4088aa0d3b7241aae, type: 3}
m_PrefabInstance: {fileID: 696764693}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &696870979 --- !u!1001 &696870979
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -74376,6 +74381,7 @@ MonoBehaviour:
trans: {fileID: 0} trans: {fileID: 0}
WanStopValve: {fileID: 527382710} WanStopValve: {fileID: 527382710}
QianStopValve: {fileID: 73554406} QianStopValve: {fileID: 73554406}
NiBianQi: {fileID: 696764695}
XiangWeiUI: {fileID: 1677353491} XiangWeiUI: {fileID: 1677353491}
temp: {fileID: 0} temp: {fileID: 0}
interactive: [] interactive: []

View File

@ -26,6 +26,7 @@ public class GameManager : MonoBehaviour
[SerializeField] Transform trans; [SerializeField] Transform trans;
[SerializeField] StopValve WanStopValve; [SerializeField] StopValve WanStopValve;
[SerializeField] StopValve QianStopValve; [SerializeField] StopValve QianStopValve;
[SerializeField] GameObject NiBianQi;
[SerializeField] Image XiangWeiUI;//ÏàλUI [SerializeField] Image XiangWeiUI;//ÏàλUI
public GameObject temp; public GameObject temp;
[SerializeField] List<GameObject> interactive; [SerializeField] List<GameObject> interactive;
@ -60,10 +61,14 @@ public class GameManager : MonoBehaviour
GFGame[i].gameObject.SetActive(true); GFGame[i].gameObject.SetActive(true);
} }
} }
if (!tempStr[1].Equals("有互感器")) else
{ {
return; NiBianQi.gameObject.SetActive(false);
} }
//if (!tempStr[1].Equals("有互感器"))
//{
// return;
//}
for (int i = 0; i < Inverter.Count; i++) for (int i = 0; i < Inverter.Count; i++)
{ {
if (sceneInfo.Equals(Inverter[i].name)) if (sceneInfo.Equals(Inverter[i].name))

View File

@ -28,14 +28,15 @@ public class newfollow : MonoBehaviour
// 进行碰撞检测 // 进行碰撞检测
bool res = Physics.Raycast(ray, out hit) && !EventSystem.current.IsPointerOverGameObject(); bool res = Physics.Raycast(ray, out hit) && !EventSystem.current.IsPointerOverGameObject();
if (res)
// 如果产生了碰撞
if (hit.transform.name.Equals(name))
{ {
Debug.Log(hit.transform.name); // 如果产生了碰撞
//game.gameObject.SetActive(true); if (hit.transform.name.Equals(name))
//game.init(url); {
Debug.Log(hit.transform.name);
//game.gameObject.SetActive(true);
//game.init(url);
}
} }
} }
} }