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

23 lines
446 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class JPB_ReplayButton : MonoBehaviour
{
private Button thisBtn;
private void Awake()
{
thisBtn = GetComponent<Button>();
thisBtn.onClick.AddListener(Replay);
}
private void Replay()
{
Debug.Log("click");
SceneManager.LoadScene(0);
}
}