1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-22 07:14:19 +00:00
better-tee/Assets/Refactored/Form/FormButtonUnity.cs
2019-09-23 18:44:56 +02:00

18 lines
464 B
C#

using UnityEngine;
using UnityEngine.UI;
namespace BetterTee.Form {
[RequireComponent(typeof(Button))]
public class FormButtonUnity : FormEvent {
protected Button buttonComponent;
private void Start() {
buttonComponent = GetComponent<Button>();
buttonComponent.onClick.AddListener(ButtonComponent_OnClick);
}
private void ButtonComponent_OnClick() {
TriggerEvent();
}
}
}