第一组代码:控制游戏运行,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public delegate void Del_ChangeButton_Hander();
public class ControllerGameRuning : MonoBehaviour {
public static event Del_ChangeButton_Hander ChangeButton_Event;
public InputField InputField_SequenceCode; //序列码
public Text Text_Error;
private bool IsSuccess = false;
void Awake()
{
if (Text_Error != null)
{
Text_Error.gameObject.SetActive(false);
}
//获取密码
InputField_SequenceCode.text = PlayerPrefs.GetString("Str");
//判断密码是否正确
if (InputField_SequenceCode.text.Length != 0)
{
//有内容,判断序列码是否正确,正确,则直接跳转
JudgeSequenceCode();
}
}
/// <summary>
/// 点击确定按钮触发的事件
/// </summary>
public void OnClcik_Confrim