// Update is called once per frame
 void LateUpdate()
 {
     if (Input.GetMouseButtonDown(0))
     {
         PlanetIsClick();
         if (mousepos.ClickObject() == transform.gameObject)
         {
             PlanetUIShow();
         }
         if (mousepos.ClickObject() == GameObject.Find("Main Camera"))
         {
             planetUIcanvas.gameObject.SetActive(false);
         }
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void LateUpdate()
 {
     if (Input.GetMouseButtonDown(0))
     {
         StarIsClick();
         if (mousepos.ClickObject() == transform.gameObject)
         {
             StarUIShow();
             starUIscript.starControlMaster = this;
         }
         if (mousepos.ClickObject() == GameObject.Find("Main Camera"))
         {
             starUIcanvas.gameObject.SetActive(false);
         }
     }
 }