Exemplo n.º 1
0
 private void InitialInput()
 {
     parameter.inputMoveVector = new Vector2(input.GetAxis("Horizontal"), input.GetAxis("Vertical"));
     parameter.inputSmoothLook = new Vector2(input.GetAxisRaw("Mouse X"), input.GetAxisRaw("Mouse Y"));
     parameter.inputCrouch     = input.GetButton("Crouch");
     parameter.inputJump       = input.GetButton("Jump");
     parameter.inputSprint     = input.GetButton("Sprint");
     parameter.inputFire       = input.GetButton("Fire");
     parameter.inputReload     = input.GetButtonDown("Reload");
 }
Exemplo n.º 2
0
 private void InitialInput()//对变量进行赋值
 {
     parameter.inputMoveVector = new Vector2(input.GetAxis("Horizontal"), input.GetAxis("Vertical"));
     //鼠标移动的输入
     parameter.inputSmoothLook = new Vector2(input.GetAxisRaw("Mouse X"), input.GetAxisRaw("Mouse Y"));
     //按键,相机的控制(上下左右)
     parameter.inputCrouch = input.GetButton("Crouch");
     parameter.inputJump   = input.GetButton("Jump");
     parameter.inputSprint = input.GetButton("Sprint");
     parameter.inputFire   = input.GetButton("Fire");
     parameter.inputReload = input.GetButtonDown("Reload");//因为装弹只需要按一次,所以只鉴定按下的信息
 }