Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     num = Input.GetAxis("Horizontal") * speed;
     if (Input.GetKeyDown(KeyCode.Space))
     {
         Ch.Jumb();
     }
     if (Input.GetKey(KeyCode.LeftControl))
     {
         crouch = true;
     }
     else
     {
         crouch = false;
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     _current_speed = Input.GetAxis("Horizontal") * speed;
     if (Input.GetKeyDown(KeyCode.Space))
     {
         rb.velocity /= 4; Ch.Jumb();
     }
     if (Input.GetKey(KeyCode.LeftControl))
     {
         crouch = true;
     }
     else
     {
         crouch = false;
     }
     walk();
 }