Пример #1
0
 private void ChargeThrow(string throwButton)
 {
     if (Input.GetButtonUp(throwButton) &&
         holdButtonTime >= 0 &&
         pickup.HasPickupable())
     {
         var pickupable = pickup.GetPickupable();
         if (holdButtonTime >= tossThreshold)
         {
             Toss(pickupable);
         }
         else
         {
             Drop(pickupable);
         }
         holdButtonTime = -1.0f;
     }
 }
 // Update is called once per frame
 void Update()
 {
     animator.SetBool("hasBox", pickUp.HasPickupable());
     animator.SetFloat("Speed", rgBody.velocity.x);
 }