You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
693 B
35 lines
693 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SceneLoader : MonoBehaviour
|
|
{
|
|
[Header("跳转场景名")]
|
|
public string sceneName;
|
|
|
|
public Color fadeColor;
|
|
|
|
public DialogTip dialogTip;
|
|
|
|
|
|
public Animator animator;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
StartCoroutine(StartLoading());
|
|
}
|
|
|
|
|
|
IEnumerator StartLoading()
|
|
{
|
|
yield return new WaitForSeconds(.75f);
|
|
yield return StartCoroutine(dialogTip.OnShow());
|
|
animator.SetTrigger("walk");
|
|
yield return new WaitForSeconds(1.5f);
|
|
Initiate.Fade(sceneName, fadeColor, 1.5f);
|
|
}
|
|
|
|
|
|
}
|