Skip to content

Classes

GlobalDescription
TouchInput

TouchInput

Kind: global class

  • TouchInput
    • new TouchInput()
    • .keyRepeatWait : Number
    • .keyRepeatInterval : Number

new TouchInput()

处理来自鼠标和触摸屏输入数据的静态类。
The static class that handles input data from the mouse and touchscreen.


TouchInput.keyRepeatWait : Number

伪按键重复的等待时间(帧数)。
The wait time of the pseudo key repeat in frames.

Kind: static property of TouchInput


TouchInput.keyRepeatInterval : Number

伪按键重复的间隔时间(帧数)。
The interval of the pseudo key repeat in frames.

Kind: static property of TouchInput


.initialize()

初始化触摸系统。
Initializes the touch system.

Kind: static function


.clear()

清除所有触摸数据。
Clears all the touch data.

Kind: static function


.update()

更新触摸数据。
Updates the touch data.

Kind: static function


.isPressed() ⇒ Boolean

检查鼠标按钮或触摸屏当前是否按下。
Checks whether the mouse button or touchscreen is currently pressed down.

Kind: static function
Returns: Boolean - 如果鼠标按钮或触摸屏被按下则为 true True if the mouse button or touchscreen is pressed


.isTriggered() ⇒ Boolean

检查左鼠标按钮或触摸屏是否刚刚被按下。
Checks whether the left mouse button or touchscreen is just pressed.

Kind: static function
Returns: Boolean - 如果鼠标按钮或触摸屏被触发则为 true True if the mouse button or touchscreen is triggered


.isRepeated() ⇒ Boolean

检查左鼠标按钮或触摸屏是否刚刚被按下或发生了伪按键重复。
Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred.

Kind: static function
Returns: Boolean - 如果鼠标按钮或触摸屏重复则为 true True if the mouse button or touchscreen is repeated


.isLongPressed() ⇒ Boolean

检查左鼠标按钮或触摸屏是否保持被按下。
Checks whether the left mouse button or touchscreen is kept depressed.

Kind: static function
Returns: Boolean - 如果左鼠标按钮或触摸屏长按则为 true True if the left mouse button or touchscreen is long-pressed


.isCancelled() ⇒ Boolean

检查右鼠标按钮是否刚刚被按下。
Checks whether the right mouse button is just pressed.

Kind: static function
Returns: Boolean - 如果右鼠标按钮刚刚被按下则为 true True if the right mouse button is just pressed


.isMoved() ⇒ Boolean

检查鼠标或触摸屏上的手指是否移动。
Checks whether the mouse or a finger on the touchscreen is moved.

Kind: static function
Returns: Boolean - 如果鼠标或触摸屏上的手指移动则为 true True if the mouse or a finger on the touchscreen is moved


.isReleased() ⇒ Boolean

检查左鼠标按钮或触摸屏是否被释放。
Checks whether the left mouse button or touchscreen is released.

Kind: static function
Returns: Boolean - 如果鼠标按钮或触摸屏被释放则为 true True if the mouse button or touchscreen is released


贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新