Cute_demon_attacks/meng_yao/Assets/script/JumpScene/SceneGuodu.cs

62 lines
1.0 KiB
C#
Raw Normal View History

2024-10-30 01:08:16 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using DG.Tweening;
using System.Threading.Tasks;
public class SceneGuodu : MonoBehaviour
{
2024-11-08 16:29:30 +08:00
public bool is_lock = false;
2024-10-30 01:08:16 +08:00
public static SceneGuodu instance;
2024-11-08 16:29:30 +08:00
public string sceneName;
2024-10-30 01:08:16 +08:00
private void Start()
{
2024-11-08 16:29:30 +08:00
2024-10-30 03:45:54 +08:00
if (instance == null)
{
DontDestroyOnLoad(this);
instance = this;
}
SceneManager.sceneLoaded += loadEnd;
2024-10-30 01:08:16 +08:00
2024-10-30 03:45:54 +08:00
}
2024-10-30 01:08:16 +08:00
2024-10-30 03:45:54 +08:00
void loadEnd(Scene scene, LoadSceneMode mode)
{
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>" + scene.name);
2024-11-07 00:06:45 +08:00
is_lock = false;
2024-10-30 03:45:54 +08:00
}
2024-10-30 01:08:16 +08:00
public async void SlideInAndLoadScene(string sceneName)
{
2024-11-07 00:06:45 +08:00
if (!is_lock)
{
2024-11-08 16:29:30 +08:00
is_lock = true;
this.sceneName = sceneName;
await Task.Delay(1000);
}
}
void JumpUI(string scenenname)
{
switch (sceneName)
{
case JumpScene.main_scene:
break;
2024-11-07 00:06:45 +08:00
}
2024-10-30 03:45:54 +08:00
2024-10-30 01:08:16 +08:00
}
2024-11-08 16:29:30 +08:00
2024-10-30 01:08:16 +08:00
}