| | |
| | | public bool customNegativeSound = false; |
| | | public int positiveSound = 0; |
| | | public int negativeSound = 0; |
| | | public float pressedScale = 1.1f; |
| | | |
| | | float m_AbleTime = 0f; |
| | | private Vector3 originalScale; |
| | | |
| | | public float ableTime { |
| | | get { return m_AbleTime; } |
| | | private set { |
| | |
| | | protected override void Awake() |
| | | { |
| | | base.Awake(); |
| | | originalScale = transform.localScale; |
| | | } |
| | | |
| | | public override void OnPointerDown(PointerEventData eventData) |
| | | { |
| | | if (this.interactable == false) |
| | | { |
| | | return; |
| | | } |
| | | base.OnPointerDown(eventData); |
| | | transform.localScale = originalScale * pressedScale; |
| | | } |
| | | |
| | | public override void OnPointerUp(PointerEventData eventData) |
| | | { |
| | | base.OnPointerUp(eventData); |
| | | transform.localScale = originalScale; |
| | | } |
| | | |
| | | private void PlayPositiveSound() |