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...
|
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...
|
|
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.
◆ TouchZoneActions
the list of possible bindable actions
Enumerator |
---|
MainAction | |
Left | |
Right | |
Up | |
Down | |
◆ 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
◆ _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
the binding of a possible action
The documentation for this class was generated from the following file:
- E:/Github/Store/HighroadEngine/Assets/HighroadEngine/Common/Scripts/GUI/TouchZone.cs