Infinite Runner Engine v1.9
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.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.InfiniteRunnerEngine.TouchZone:

Public Types

enum  TouchZoneActions {
  MainAction , Pause , 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 
Pause 
Left 
Right 
Up 
Down 

Member Function Documentation

◆ OnPointerDown()

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

Triggers the bound pointer down action

◆ OnPointerPressed()

void MoreMountains.InfiniteRunnerEngine.TouchZone.OnPointerPressed ( )

Triggers the bound pointer pressed action

◆ OnPointerUp()

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

Triggers the bound pointer up action

◆ Start()

void MoreMountains.InfiniteRunnerEngine.TouchZone.Start ( )
protected

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

◆ Update()

void MoreMountains.InfiniteRunnerEngine.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.InfiniteRunnerEngine.TouchZone._zonePressed = false
protected

◆ OnPointerDownAction

string MoreMountains.InfiniteRunnerEngine.TouchZone.OnPointerDownAction
protected

◆ OnPointerPressedAction

string MoreMountains.InfiniteRunnerEngine.TouchZone.OnPointerPressedAction
protected

◆ OnPointerUpAction

string MoreMountains.InfiniteRunnerEngine.TouchZone.OnPointerUpAction
protected

◆ SendDownEvent

bool MoreMountains.InfiniteRunnerEngine.TouchZone.SendDownEvent = true

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

◆ SendPressedEvent

bool MoreMountains.InfiniteRunnerEngine.TouchZone.SendPressedEvent = false

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

◆ SendUpEvent

bool MoreMountains.InfiniteRunnerEngine.TouchZone.SendUpEvent = true

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

◆ TouchZoneBinding

TouchZoneActions MoreMountains.InfiniteRunnerEngine.TouchZone.TouchZoneBinding

the binding of a possible action


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