///
/// ZWN
/// 跳转场景
/// 20211011
///
using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine;
using ET;
public class Load_Scene : MonoBehaviour
{
public static Load_Scene single;
bool start = false;
void Awake()
{
single = this;
}
void Start()
{
if (!start)
{
//Log.Info("Start onpause");
//zwn_common_data.single.zwn_data_cur.onpause(false);
start = true;
}
}
///
/// 设置跳转场景逻辑
///
///
public void load_scene_as(int i)
{
//zwn_common_data.single.zwn_data_cur.onpause(true);
SceneManager.LoadSceneAsync(i);
}
public void load_scene_as_name(string name)
{
//zwn_common_data.single.zwn_data_cur.onpause(true);
SceneManager.LoadScene(name);
//SceneManager.LoadScene(name);
}
int cur;
public int load_scene_string(string str)
{
cur = -1;
/*if (str == "1001")
{
cur = 1;
}
if (str == "1002")
{
cur = 2;
}
if (str == "1003")
{
cur = 3;
}
if (str == "1004")
{
cur = 4;
}
if (str == "1005")
{
cur = 5;
}
if (str == "1006")
{
cur = 6;
}*/
if (str == "1001")
{
cur = 1;
}
if (str == "1002")
{
cur = 2;
}
if (str == "1004")
{
cur = 3;
}
if (str == "1005")
{
cur = 4;
}
if (str == "1006")
{
cur = 5;
}
if (cur == -1)
{
}
else
{
//zwn_common_data.single.zwn_data_cur.onpause(true);
SceneManager.LoadSceneAsync(cur);
}
return cur;
}
}