Highroad Engine v1.3
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.HighroadEngine.TouchZone Class Reference

Add this component to a GUI button to have it act as a proxy for a certain action on touch devices. Detects press down, press up, and continuous press. These are really basic mobile/touch controls. I believe that for infinite runners they're sufficient. More...

Inheritance diagram for MoreMountains.HighroadEngine.TouchZone:

Public Types

enum  TouchZoneActions {
  MainAction , Left , Right , Up ,
  Down
}
 the list of possible bindable actions More...
 

Public Member Functions

void OnPointerDown (PointerEventData data)
 Triggers the bound pointer down action More...
 
void OnPointerUp (PointerEventData data)
 Triggers the bound pointer up action More...
 
void OnPointerPressed ()
 Triggers the bound pointer pressed action More...
 

Public Attributes

TouchZoneActions TouchZoneBinding
 the binding of a possible action More...
 
bool SendDownEvent = true
 should the component send an event when the zone is pressed down ? More...
 
bool SendUpEvent = true
 should the component send an event when the zone is pressed up ? More...
 
bool SendPressedEvent = false
 should the component send an event when the zone is being pressed ? More...
 

Protected Member Functions

void Start ()
 Triggered at initialization, binds the touch zone to input manager's methods More...
 
void Update ()
 Every frame, if the touch zone is pressed, we trigger the OnPointerPressed method, to detect continuous press More...
 

Protected Attributes

bool _zonePressed = false
 
string OnPointerDownAction
 
string OnPointerUpAction
 
string OnPointerPressedAction
 

Detailed Description

Add this component to a GUI button to have it act as a proxy for a certain action on touch devices. Detects press down, press up, and continuous press. These are really basic mobile/touch controls. I believe that for infinite runners they're sufficient.

Member Enumeration Documentation

◆ TouchZoneActions

the list of possible bindable actions

Enumerator
MainAction 
Left 
Right 
Up 
Down 

Member Function Documentation

◆ OnPointerDown()

void MoreMountains.HighroadEngine.TouchZone.OnPointerDown ( PointerEventData  data)

Triggers the bound pointer down action

◆ OnPointerPressed()

void MoreMountains.HighroadEngine.TouchZone.OnPointerPressed ( )

Triggers the bound pointer pressed action

◆ OnPointerUp()

void MoreMountains.HighroadEngine.TouchZone.OnPointerUp ( PointerEventData  data)

Triggers the bound pointer up action

◆ Start()

void MoreMountains.HighroadEngine.TouchZone.Start ( )
protected

Triggered at initialization, binds the touch zone to input manager's methods

◆ Update()

void MoreMountains.HighroadEngine.TouchZone.Update ( )
protected

Every frame, if the touch zone is pressed, we trigger the OnPointerPressed method, to detect continuous press

Member Data Documentation

◆ _zonePressed

bool MoreMountains.HighroadEngine.TouchZone._zonePressed = false
protected

◆ OnPointerDownAction

string MoreMountains.HighroadEngine.TouchZone.OnPointerDownAction
protected

◆ OnPointerPressedAction

string MoreMountains.HighroadEngine.TouchZone.OnPointerPressedAction
protected

◆ OnPointerUpAction

string MoreMountains.HighroadEngine.TouchZone.OnPointerUpAction
protected

◆ SendDownEvent

bool MoreMountains.HighroadEngine.TouchZone.SendDownEvent = true

should the component send an event when the zone is pressed down ?

◆ SendPressedEvent

bool MoreMountains.HighroadEngine.TouchZone.SendPressedEvent = false

should the component send an event when the zone is being pressed ?

◆ SendUpEvent

bool MoreMountains.HighroadEngine.TouchZone.SendUpEvent = true

should the component send an event when the zone is pressed up ?

◆ TouchZoneBinding

TouchZoneActions MoreMountains.HighroadEngine.TouchZone.TouchZoneBinding

the binding of a possible action


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