Bandidos
Classes | Public Member Functions | List of all members
com.mygdx.game.touchinput.TouchEvent Class Reference
Inheritance diagram for com.mygdx.game.touchinput.TouchEvent:
com.mygdx.game.engine.events.Event

Classes

enum  TouchType
 

Public Member Functions

 TouchEvent (Vector2 location, int pointer, TouchType touchType, String type, int touchLayer)
 
int getTouchX ()
 
int getTouchY ()
 
int getPointer ()
 
TouchType getTouchType ()
 
int getTouchLayer ()
 
void clean ()
 
- Public Member Functions inherited from com.mygdx.game.engine.events.Event
 Event (String type)
 
String getType ()
 
EventDispatcher getDispatcher ()
 
void setDispatcher (EventDispatcher dispatcherValue)
 
void clean ()
 

Detailed Description

This class or an extending class is an event which is dispatched for touch events.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ TouchEvent()

com.mygdx.game.touchinput.TouchEvent.TouchEvent ( Vector2  location,
int  pointer,
TouchType  touchType,
String  type,
int  touchLayer 
)

The touch event with all info

Parameters
locationthe touch is on the screen
pointerto the specific touch. Can be seen as an Id for the touch
touchTypeto identify what kind of touch it is.
typeof event which the event represents.

Member Function Documentation

◆ clean()

void com.mygdx.game.touchinput.TouchEvent.clean ( )

◆ getPointer()

int com.mygdx.game.touchinput.TouchEvent.getPointer ( )

The Pointer which represents the specific touch. Can be seen as an Id for the touch

Returns
The pointer of the touch

◆ getTouchLayer()

int com.mygdx.game.touchinput.TouchEvent.getTouchLayer ( )

Returns the layer in which the touch occured.

Returns
The Touch layer as integer.

◆ getTouchType()

TouchType com.mygdx.game.touchinput.TouchEvent.getTouchType ( )

The type of the touch represents to what happened in the touch.

Returns
the touchType of the touch

◆ getTouchX()

int com.mygdx.game.touchinput.TouchEvent.getTouchX ( )

Gets the X position of the touch

Returns
The x position of the touch.

◆ getTouchY()

int com.mygdx.game.touchinput.TouchEvent.getTouchY ( )

Gets the Y position of the touch

Returns
The y position of the touch.

The documentation for this class was generated from the following file: