1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-26 00:34:18 +00:00
better-tee/Assets/Refactored/Form/FormButtonUnity.cs

19 lines
464 B
C#
Raw Normal View History

2019-09-23 16:44:56 +00:00
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();
}
}
}