InputEventJoypadButton¶ 继承: InputEvent < Resource < RefCounted < Object 表示正在按下或释放的应用手柄按钮。 描述¶ 应用手柄按钮的输入事件类型。有关应用手柄模拟棒和操纵杆,请参阅InputEventJoypadMotion。 属性¶ JoyButton button_index 0 bool pressed false float pressure 0.0 属性说明¶ JoyButton button_index = 0 🔗 void set_button_index(value: JoyButton) JoyButton get_button_index() 按钮标识符。JoyButton按钮常量之一。 bool pressed = false 🔗 void set_pressed(value: bool) bool is_pressed() 如果true,则按下按钮的状态。如果false,则释放按钮的状态。 float pressure = 0.0 🔗 void set_pressure(value: float) float get_pressure() 已弃用: 该属性永远不会由引擎设置,并且始终为 0。