Esempio n. 1
0
    public void Locater()
    {
        if (Location.Equals(false))
        {
            //transform.GetChild(0).GetComponent<MeshRenderer>().material.color = new Color(0.6f, 0.6f, 0.6f, 0.6f);
            //LuisManager.instance.LUISFeedback.text = "LUIS:OK,I already turn on Location Function";
            Location = true;
            GameObject.Find("MainCamera").transform.GetChild(0).gameObject.SetActive(true);

            closerenderer(GameObject.Find("1fv1(Clone)"));
            foreach (Transform child in GameObject.Find("1fv1(Clone)").transform)
            {
                foreach (Transform childin in child.transform)
                {
                    if (childin.gameObject.GetComponent <MeshCollider>() == true)
                    {
                        childin.gameObject.GetComponent <MeshCollider>().enabled = false;
                    }
                }
            }
            return;
        }
        if (Location.Equals(true))
        {
            //transform.GetChild(0).GetComponent<MeshRenderer>().material = GameObject.Find("Material").transform.GetChild(0).GetComponent<MeshRenderer>().material;
            Set_Model.CleanAllPoints();
            GameObject.Find("MainCamera").transform.GetChild(0).gameObject.SetActive(false);
            //LuisManager.instance.LUISFeedback.text = "The Location Function is off";
            Location = false;
            return;
        }
    }
Esempio n. 2
0
 // Checking the amount of time passed between OnPointerClicked calls is handling the case when OnPointerClicked is called
 // twice after one click.  If OnPointerClicked is called twice after one click, the object will be selected and then immediately
 // unselected. If OnPointerClicked calls are within 0.5 secs of each other, then return to prevent an immediate object state switch.
 public void Ontoo()
 {
     //Debug.Log("執行Ontoo()");
     if (Measure.RulerOn.Equals(true))
     {
         Measure.OnSelect12();
     }
     if (Set_Model.Location.Equals(true))
     {
         Set_Model.ModelLocation();
     }
     if (QRCODEHM.Location.Equals(true))
     {
         QRCODEHM.ModelLocation();
     }
 }