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); } }