using System; using Mono.Event; using TMPro; using UnityEngine.UI; namespace UnityTest.ZXL { public class ChoiceQuestionUI : UI { public Button btnFirst; public Button btnSecond; public override void OnInit() { base.OnInit(); btnFirst.onClick.AddListener(ClickFirst); btnSecond.onClick.AddListener(ClickSecond); } private void ClickFirst() { EventManager.Instance.FireNow(this, new ChoiceQuestionEventArgs(true)); } private void ClickSecond() { EventManager.Instance.FireNow(this, new ChoiceQuestionEventArgs(false)); } } }