29 lines
705 B
C#
29 lines
705 B
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 static SceneGuodu instance;
|
|
public RectTransform panel; // ÕÚÕÖµÄRectTransform
|
|
public float transitionTime = 1f; // ¹ý¶Éʱ¼ä
|
|
public GameObject mask;//ÕÚÕÖ
|
|
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);
|
|
}
|
|
|
|
}
|