66 lines
2.2 KiB
C#
66 lines
2.2 KiB
C#
using Data;
|
||
using System;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
using Utility;
|
||
//============================================================
|
||
//支持中文,文件使用UTF-8编码
|
||
//@author YangHua
|
||
//@create 20230913
|
||
//@company QianHuo
|
||
//
|
||
//@description:
|
||
//============================================================
|
||
namespace Adam
|
||
{
|
||
public class GoToSceneController : MonoBehaviour
|
||
{
|
||
public Button goToSceneBtn;
|
||
public InputField userID;
|
||
public GameObject GoToTheScenePlane;
|
||
// Use this for initialization
|
||
private void Start()
|
||
{
|
||
goToSceneBtn.onClick.AddListener(OnGo);
|
||
}
|
||
|
||
public void OnGo()
|
||
{
|
||
string sceneInfo = ExamusersController.Instance.GetSceneInfoByUseNo(userID.text);
|
||
GlobalFlag.userId = userID.text;
|
||
Debug.Log(GlobalFlag.userId);
|
||
string[] tt = ToolUtility.GetInfo(sceneInfo, '_');
|
||
SceneInfoData sceneInfoData = new SceneInfoData(tt[0], tt[1], tt[2]);
|
||
GlobalFlag.sceneData = sceneInfoData;
|
||
GlobalFlag.pvw = ExamusersController.Instance.GetPVWByUseNo(userID.text);
|
||
SwitchPanel();
|
||
UIManager.Instance.backToToolBtn.gameObject.SetActive(true);
|
||
UIManager.Instance.threeDTip.transform.parent.gameObject.SetActive(false);
|
||
SceneLoad.Instance.SceneChange(tt[3]);
|
||
//switch (tt[3])
|
||
//{
|
||
// case "自建房场景":
|
||
// SceneLoad.Instance.SceneChange("居民自建");
|
||
// break;
|
||
// case "农家乐场景":
|
||
// SceneLoad.Instance.SceneChange("农家乐");
|
||
// break;
|
||
// case "小商户场景":
|
||
// SceneLoad.Instance.SceneChange("小商户");
|
||
// break;
|
||
// case "农贸市场场景":
|
||
// SceneLoad.Instance.SceneChange("农贸市场");
|
||
// break;
|
||
//}
|
||
}
|
||
|
||
public void SwitchPanel()
|
||
{
|
||
UIManager.Instance.threeDTip.gameObject.SetActive(false);
|
||
GoToTheScenePlane.SetActive(false);
|
||
}
|
||
}
|
||
}
|