Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. if (Input.GetButtonDown("Focus")){speedNow = speedFocused;}
  2. if (Input.GetButtonUp("Focus"){speedNow = speedNormal;}
  3. rb.velocity = movement * speedNow;
  4.  
  5.  
  6. if (Input.GetButton("Focus"){rb.velocity = movement * speedFocused;}
  7. else {rb.velocity = movement * speedNormal;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement