Beispiel #1
0
 void Update()
 {
     if (Time.frameCount % 4 == 0)
     {
         if (data.interactible == true)
         {
             if (Input.GetKeyDown(KeyCode.E))
             {
                 ManagerialTroubles.LoadNextScene();
             }
         }
         RaycastHit?hit = DoRayCasting();
         if (hit.HasValue)
         {
             if (data.IsThisMewObject(hit.Value.transform))
             {
                 data.UpdateData(hit);
             }
         }
         else
         {
             if (data.HitTransform)
             {
                 data.Reset();
                 data.interactible = false;
             }
         }
     }
 }