JoystickButton.cs 465 B

12345678910111213141516
  1. using UnityEngine.UI;
  2. namespace Google.Maps.Demos.Utilities {
  3. /// <summary>
  4. /// Helper class to expose the IsPressed status from the standard button.
  5. /// </summary>
  6. public class JoystickButton : Button {
  7. /// <summary>
  8. /// Checks if the button is continuously pressed.
  9. /// </summary>
  10. /// <returns>A boolean indicating if the button is currently pressed.</returns>
  11. public bool IsButtonPressed() {
  12. return IsPressed();
  13. }
  14. }
  15. }