using System.Collections; using System.Collections.Generic; using UnityEngine; public class Main : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { /*if (UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject() == false && _G.SM != "plan2D" && DOIT.Mousecheck() == true) HitObject.CheckHIT(); DOIT.btnColor(); TRANS.go(); //Get cap GameObject[] caps; caps = GameObject.FindGameObjectsWithTag("caps"); if (_G.SHOWCAP == true) { foreach (GameObject obj in caps) { obj.transform.Find("BG").gameObject.SetActive(true); obj.transform.Find("TXT").gameObject.SetActive(true); GameObject Papa = obj.transform.parent.gameObject; Vector3 SC = Papa.transform.localScale; Papa.transform.localScale = new Vector3(1, 1, 1); Camera CAM = Camera.main; Vector3 v = CAM.transform.position - obj.transform.position; v.x = 0.0f; v.z = 0.0f; obj.transform.LookAt(CAM.transform.position - v); obj.transform.Rotate(0, 180, 0); Papa.transform.localScale = SC; } } else { foreach (GameObject obj in caps) { obj.transform.Find("BG").gameObject.SetActive(false); obj.transform.Find("TXT").gameObject.SetActive(false); } } if (GameObject.Find("New Game Object")) Destroy(GameObject.Find("New Game Object")); if (_G.SM != "plan2D") { //Navigate setup GameObject[] MENU = GameObject.FindGameObjectsWithTag("Menu"); GameObject[] PNL = GameObject.FindGameObjectsWithTag("pnl"); if (MENU.Length != 0 || PNL.Length != 0 || _G.NAVIGATE == false) { if (_G.SM == "navigate" || _G.SM == "" || _G.NAVIGATE == false) if (_G.SM != "paint" && _G.SM != "measure" && _G.SM != "align" && _G.SM != "plan2D" && _G.SM != "groupmove") _G.SM = "pnl"; } else _G.SM = "navigate"; if (_G.SM == "PNL") _G.SM = "pnl"; //Hide front camera Vector3 cp = GameObject.Find("Main Camera").transform.position; Vector3 op = new Vector3(0, 0, 0); foreach (Transform obj in GameObject.Find("SCENE").gameObject.transform) { op = obj.gameObject.transform.position; if (Vector3.Distance(cp, op) < 100 && _G.SM == "navigate") { obj.gameObject.SetActive(false); } if (Vector3.Distance(cp, op) > 100) { obj.gameObject.SetActive(true); } } if (GameObject.Find("TextSM")) GameObject.Find("TextSM").gameObject.GetComponent().text = _G.SM; } if (_G.SM == "navigate") { DOIT.ResetRoomSelect(); }*/ } }