Advertisement
Guest User

Untitled

a guest
Feb 11th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. if ((Input.GetKey (KeyCode.W)||Input.GetKey (KeyCode.UpArrow)) && (jumpTimer > 0)) {
  2.            
  3.             rigidbody2D.AddForce (new Vector2(0f,jumpForce));
  4.         }
  5.  
  6.         if (grounded == false) {
  7.                         jumpTimer -= Time.deltaTime;   
  8.                 } else
  9.         {
  10.             jumpTimer = per;
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement