Fork me on GitHub
View source

package com.haxepunk.utils

class Touch

Constructor

View source

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

Creates a new touch object


Parameters:
x   

x-axis coord in window

y   

y-axis coord in window

id   

touch id

Variables

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