InputEventJoypadButton

继承: InputEvent < Resource < RefCounted < Object

代表按下或松开的游戏手柄按钮。

描述

游戏手柄按钮的输入事件类型。对于游戏手柄模拟摇杆和操纵杆,请参阅 InputEventJoypadMotion

教程

属性

JoyButton

button_index

0

bool

pressed

false

float

pressure

0.0


属性说明

JoyButton button_index = 0

按钮标识符。JoyButton 按钮常量之一。


bool pressed = false

  • void set_pressed ( bool value )

  • bool is_pressed ( )

如果为 true,按钮的状态被按下。如果为 false,按钮的状态被释放。


float pressure = 0.0

  • void set_pressure ( float value )

  • float get_pressure ( )

如果控制器支持,则表示用户用手指在按钮上施加的压力。范围从 01

Previous Next


© 版权所有 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision b1c660f7.

Built with Sphinx using a theme provided by Read the Docs.