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

29 lines
705 B
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
{
public static SceneGuodu instance;
public RectTransform panel; // <20><><EFBFBD>ֵ<EFBFBD>RectTransform
public float transitionTime = 1f; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
public GameObject mask;//<2F><><EFBFBD><EFBFBD>
private void Start()
{
instance = this;
}
public async void SlideInAndLoadScene(string sceneName)
{
Debug.Log(sceneName);
mask.GetComponent<CircleDissolveEffect>().isTransitioning = false;
await Task.Delay(1000);
SceneManager.LoadScene(sceneName);
}
}