예제 #1
0
파일: test1.cs 프로젝트: A7medMorgan/Fix-IT
 // 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;
     }
 }
예제 #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();
 }