Files
hw-pixelone-course-creating…/Platformer/Assets/Scripts/PressButton.cs
2023-06-11 00:35:07 +03:00

19 lines
331 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PressButton : MonoBehaviour {
private bool isPressed;
public bool IsPressed => isPressed;
public void OnPointerDown() {
isPressed = true;
}
public void OnPointerUp() {
isPressed = false;
}
}