getGamepadButton 判断是否已经按下手柄键
getGamepadButton
类型: MethodDeclaration
定义位置: input.ts
描述
判断是否已经按下手柄键
参数 button
: 键码
返回值:是否已经按下
参数
参数名 | 类型 | 描述 | 默认值 |
---|---|---|---|
button | ControllerButtonCode | - | - |
返回值
类型: boolean
是否已经按下
源代码
位置: 第 158 行
public getGamepadButton(button: ControllerButtonCode): boolean {
return Controller.buttons[button]
}
文档生成时间:2025/7/7 12:07:06