Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     ResetObjectToOriginalPosition();
     if (objectFound)
     {
         GetComponent <EditObjectGlow>().GlowColor = Color.black;
         analytics.FindObject(sceneName, gameObjectName);
         DGS.numItemsFound++;
         IMI.enabled     = true;
         IMI.countObject = true;
         IMI.resetObject = gameObject.GetComponent <ResetObject>();
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         pointerToButton.value = 0;
     }
     if (Input.GetKeyDown(KeyCode.D))
     {
         pointerToButton.value = 1;
     }
     if (Input.GetKeyDown(KeyCode.Return))
     {
         if (pointerToButton.value == 1)
         {
             if (countObject)
             {
                 countObject             = false;
                 resetObject.objectFound = false;
                 resetObject             = null;
                 gameObject.GetComponent <InspectMenuInteraction>().enabled = false;
                 inspectionPanel.SetActive(false);
             }
         }
         else if (pointerToButton.value == 0)
         {
             if (countObject)
             {
                 GetComponent <EditObjectGlow>().GlowColor = Color.black;
                 analytics.FindObject(sceneName, gameObjectName);
                 DGS.numItemsFound++;
                 countObject = false;
                 gameObject.GetComponent <InspectMenuInteraction>().enabled = false;
                 inspectionPanel.SetActive(false);
             }
         }
     }
 }