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, vehicleInputGo; Button walkButton, sprintButton, jumpButton, crouchButton, enterButton, aimButton, fireButton, flyButton, exitVehicleButton, nextWeaponButton, previousWeaponButton; UIEventsPickup jumpButtonEventsPickup, fireButtonEventsPickup, handbrakePickup, backwardVehiclePickup, forwardVehiclePickup; Text walkButtonText, sprintButtonText, aimButtonText, jumpButtonText, fireButtonText; ArrowsMovementButton movementButton, turnVehicleButton; bool m_walkPressed, m_sprintPressed, m_aimPressed, m_crouchPressed, m_enterPressed, m_flyPressed, m_exitVehiclePressed, m_nextWeaponPressed, m_previousWeaponPressed; 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; vehicleInputGo = canvas.transform.GetChild(1).gameObject; Transform parent = pedMovementInputGo.transform; walkButton = parent.Find("WalkButton").GetComponent