天天看點

unity響應鍵盤的組合鍵

響應組合鍵即判斷兩個按鍵是否同時被按下

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

這段代碼就是在同時按下c鍵和1鍵是響應

繼續閱讀