using UnityEngine;
using System.Collections;
/*
* 使用方法:将该脚本附在镜头下面,然后切换场景时镜头不销毁
* 要调用的时候获得该脚本,然后调用StartSplash()
*/
//@author joi
public class SceneLoad : MonoBehaviour
{
public int guiDepth = 0;
public string levelToLoad = "";
//将要加载的场景序号
public int levelToLoadInt;
//切换场景的纹理
public Texture2D splashLogo;
//淡入淡出的速度
float fadeSpeed = 0.8f;
//保持纹理最高透明度的时间
float waitTime = 0f;
//是否要等待输入
public bool waitForInput = false;
public bool startAutomatically = false;
public bool IsDealPlayer = false;
private float timeFadingInFinished = 0.0f;
//处理切换场景后需要实现的事件
public delegate void EventHandler();
public event EventHandler trigger;
public delegate void EventHandler2nd();
public event EventHandler2nd triggerAtLoading;
//淡入淡出方式
public enum SplashTyp
Unity切换场景淡入淡出
最新推荐文章于 2024-04-27 22:11:16 发布