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.inputFire       = input.GetButton("Fire");
     parameter.inputSprint     = input.GetButton("Sprint");
     parameter.inputReload     = input.GetButton("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");//因为装弹只需要按一次,所以只鉴定按下的信息
 }
Exemplo n.º 3
0
 private void InitialInput()
 {
     parameter.inputSmoothLook = new Vector2(input.GetAxisRaw("Mouse X"), input.GetAxisRaw("Mouse Y"));
     parameter.inputMoveVector = new Vector2(input.GetAxis("Horizontal"), input.GetAxis("Vertical"));
     parameter.inputCrouch     = input.GetButton("Crouch");
     parameter.inputFire       = input.GetButton("Fire");
     parameter.inputJump       = input.GetButton("Jump");
     parameter.inputSprint     = input.GetButton("Sprint");
     parameter.inputReload     = input.GetButtonDown("Reload");
     parameter.inputEscape     = input.GetButton("Escape");
     parameter.inputGrenade    = input.GetButton("Grenade");
 }