using System.Collections.Generic; using UnityEngine; using SanAndreasUnity.Behaviours; using SanAndreasUnity.Utilities; using UnityEngine.UI; namespace SanAndreasUnity.UI { public class TouchInput : MonoBehaviour { public static TouchInput Instance { get; private set; } Canvas canvas; GameObject pedMovementInputGo; Button walkButton, sprintButton, jumpButton, crouchButton, enterButton, aimButton, fireButton, flyButton; UIEventsPickup jumpButtonEventsPickup, fireButtonEventsPickup; Text walkButtonText, sprintButtonText, aimButtonText, jumpButtonText, fireButtonText; ArrowsMovementButton movementButton; bool m_walkPressed, m_sprintPressed, m_aimPressed, m_crouchPressed, m_enterPressed, m_flyPressed; public Color activeButtonColor = Color.blue; public Color inactiveButtonColor = Color.black; void Awake () { Instance = this; // setup references canvas = this.transform.GetChild(0).GetComponent(); pedMovementInputGo = canvas.transform.GetChild(0).gameObject; Transform parent = pedMovementInputGo.transform; walkButton = parent.Find("WalkButton").GetComponent