来自于:万士辰
void Update(){//识别键盘输入//键盘A键按住//第一种方式 "a" 必须是小写字母if (Input.GetKey("a")){}//第二种方式 KeyCode的枚举类型if (Input.GetKey(KeyCode.A)){}//键盘A按下瞬间if (Input.GetKeyDown("a")){}if (Input.GetKeyDown(KeyCode.A)){}//键盘A抬起瞬间if (Input.GetKeyUp("a")){}if (Input.GetKeyUp(KeyCode.A)){}//识别鼠标输入//鼠标左键按住//int 0 (右键1 中键2)if (Input.GetMouseButton(0)){}//鼠标左键按下瞬间if (Input.GetMouseButtonDown(0)){}//鼠标左键抬起瞬间if (Input.GetMouseButtonUp(0)){}}
