Cute_demon_attacks/meng_yao/Assets/script/JumpScene/SceneGuodu.cs
2024-11-08 16:29:30 +08:00

62 lines
1.0 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using DG.Tweening;
using System.Threading.Tasks;
public class SceneGuodu : MonoBehaviour
{
public bool is_lock = false;
public static SceneGuodu instance;
public string sceneName;
private void Start()
{
if (instance == null)
{
DontDestroyOnLoad(this);
instance = this;
}
SceneManager.sceneLoaded += loadEnd;
}
void loadEnd(Scene scene, LoadSceneMode mode)
{
Debug.Log("³¡¾°¼ÓÔØÍê³É£º" + scene.name);
is_lock = false;
}
public async void SlideInAndLoadScene(string sceneName)
{
if (!is_lock)
{
is_lock = true;
this.sceneName = sceneName;
await Task.Delay(1000);
}
}
void JumpUI(string scenenname)
{
switch (sceneName)
{
case JumpScene.main_scene:
break;
}
}
}