Completely remake mobile gameplayer buttons, and rever graphics renderer changes and just have linux on Vulkan instead
This commit is contained in:
17
Assets/Scripts/HoldableButton.cs
Normal file
17
Assets/Scripts/HoldableButton.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class HoldableButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
||||
{
|
||||
public bool isPressed;
|
||||
|
||||
public void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
isPressed = true;
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData eventData)
|
||||
{
|
||||
isPressed = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user