Skip to main content

getGamepadButton 判断是否已经按下手柄键

getGamepadButton

类型: MethodDeclaration

定义位置: input.ts

描述

判断是否已经按下手柄键

参数 button: 键码

返回值:是否已经按下

参数

参数名类型描述默认值
buttonControllerButtonCode--

返回值

类型: boolean

是否已经按下

源代码

位置: 第 158 行

public getGamepadButton(button: ControllerButtonCode): boolean {
return Controller.buttons[button]
}

文档生成时间:2025/7/7 12:07:06