天天看点

unity响应键盘的组合键

响应组合键即判断两个按键是否同时被按下

if(Input.GetKey("c")&&Input.GetKey("1")){
    //do sth
}
           

这段代码就是在同时按下c键和1键是响应

继续阅读