Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Settings.selectionMode == "Pointer")
     {
         if (!MovingZ())
         {
             UpdateTarget();
             if (HasTarget())
             {
                 ray.UpdateRay(Vector3.Distance(transform.position, currentTarget.impactPoint));
             }
         }
         else
         {
             HideRay();
             crosshair.HideCrosshair();
         }
     }
     else
     {
         ClearTarget();
         HideRay();
         crosshair.HideCrosshair();
     }
 }