2020年4月29日 星期三
【Unity3D】Input.GetKey, Input.GetKeyUp, Input.GetKeyDown 三者的差別
Input.GetKey : 一直按著按鍵也會觸發動作,譬如連發的機關槍
Input.GetKeyUp : 會在按下按鍵然後放開按鍵後觸發一次,然後就不再觸發
Input.GetKeyDown : 會在按下按鍵的當下觸發一次,然後就不再觸發
【Unity3D】在沒有鍵盤或是觸控的裝置上 無法使用Input.GetKey的情況下可以使用GetButton
在沒有鍵盤或是觸控的裝置上
無法使用Input.GetKey的情況下可以使用GetButton來操控定義了ButtonName的虛擬按鍵
Returns true while the virtual button identified by buttonName is held down.
無法使用Input.GetKey的情況下可以使用GetButton來操控定義了ButtonName的虛擬按鍵
Returns true while the virtual button identified by buttonName is held down.
訂閱:
文章 (Atom)