C# Class TouchScript.InputSources.InputHandlers.TouchHandler

Unity touch handling implementation which can be embedded and controlled from other (input) classes.
Inheritance: IDisposable
Datei anzeigen Open project: DRMold/HungryHungryTetris Class Usage Examples

Public Methods

Method Description
CancelTouch ( TouchPoint touch, bool @return ) : bool
Dispose ( ) : void
TouchHandler ( Tags tags, Func beginTouch, Vector2>.Action moveTouch, Action endTouch, Action cancelTouch ) : System

Initializes a new instance of the TouchHandler class.

Update ( ) : void

Updates this instance.

Private Methods

Method Description
internalBeginTouch ( Vector2 position ) : TouchPoint
internalCancelTouch ( int id ) : void
internalEndTouch ( int id ) : void

Method Details

CancelTouch() public method

public CancelTouch ( TouchPoint touch, bool @return ) : bool
touch TouchPoint
@return bool
return bool

Dispose() public method

public Dispose ( ) : void
return void

TouchHandler() public method

Initializes a new instance of the TouchHandler class.
public TouchHandler ( Tags tags, Func beginTouch, Vector2>.Action moveTouch, Action endTouch, Action cancelTouch ) : System
tags Tags Tags to add to touches.
beginTouch Func A function called when a new touch is detected. As this function must accept a Vector2 position of the new touch and return an instance of .
moveTouch Vector2>.Action A function called when a touch is moved. As this function must accept an int id and a Vector2 position.
endTouch Action A function called when a touch is lifted off. As this function must accept an int id.
cancelTouch Action A function called when a touch is cancelled. As this function must accept an int id.
return System

Update() public method

Updates this instance.
public Update ( ) : void
return void