Example #1
0
 /// <summary>
 /// Aims the bow
 /// </summary>
 private void Aim()
 {
     if (crosshair.activeSelf != isActionButtonPressed)
     {
         crosshair.SetActive(isActionButtonPressed);
         if (grabbedObject)
         {
             grabbedObject.Aim(isActionButtonPressed);
         }
     }
     if (movementDirection != Vector2.zero)
     {
         crosshair.transform.localPosition = movementDirection * crosshairDistance;
         aimDirection = crosshair.transform.localPosition;
         aimDirection.Normalize();
     }
 }