Cute_demon_attacks/meng_yao/Assets/textRoading.cs

29 lines
585 B
C#
Raw Normal View History

2024-10-30 01:08:16 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class textRoading : MonoBehaviour
{
public bool Is;
public Button BTN;
// Start is called before the first frame update
void Start()
{
BTN.onClick.AddListener(OnBTN);
}
// Update is called once per frame
void OnBTN()
{
if (Is)
{
Debug.Log(Is);
SceneManager.LoadScene(JumpScene.main_scene);
return;
}
Debug.Log(Is);
}
}