Fork me on GitHub
View source

package haxepunk.input

class Touch

Static variables

static read only touchOrder : Array<Int>

static read only touches : Map<Int, Touch>

Static functions

View source

static checkInput (input : InputType) : Bool

View source

static postUpdate () : Void

View source

static pressedInput (input : InputType) : Bool

View source

static releasedInput (input : InputType) : Bool

View source

static touchPoints (touchCallback : Touch ->Void, ) : Void

View source

static update () : Void


View source

new (x : Float, y : Float, id : Int) : Void

Creates a new touch object


x-axis coord in window


y-axis coord in window


touch id


read only id : Int

Touch id used for multiple touches

read only pressed : Bool

If the touch was pressed this frame.

released : Bool

Not implemented yet. Always return false.

read only sceneX : Float

The touch x-axis coord in the scene.

read only sceneY : Float

The touch y-axis coord in the scene.

startX : Float

Starting X position of touch

startY : Float

Starting Y position of touch

read only time : Float

The time this touch has been held

x : Float

X-Axis coord in window

y : Float

Y-Axis coord in window