ZoeAppClass/Assets/Jogos/Jeopardy/Scripts/JPB_AnswerButtonBehaviour.cs

24 lines
548 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class JPB_AnswerButtonBehaviour : MonoBehaviour
{
private Button thisBtn;
public JPB_QuestionButtonBehaviour qBBParent;
public int thisBtnId;
// Start is called before the first frame update
void Awake()
{
thisBtn = GetComponent<Button>();
thisBtn.onClick.AddListener(DoClick);
}
private void DoClick()
{
JPB_QuestionManager.instance.CheckAnswer(thisBtnId, qBBParent);
}
}