视野逐渐变暗之跳转场景

在摄像机前挂一个Image,失活,当跳转场景时激活

并且上面挂Canvas Group 组件

image  Color属性:

代码:

//加载场景
        if (isLoad == true) 
        {
            loadingImage.SetActive(true);
            timer_load += Time.deltaTime * 0.3f;
            loadingImage.GetComponent<CanvasGroup>().alpha = timer_load;
            if (timer_load >= 1) 
            {
                timer_load= 1;
                SceneManager.LoadScene("shaked");//跳转到某个场景
            }
        }

转载于:https://www.cnblogs.com/huang--wei/p/11121199.html

猜你喜欢

转载自blog.csdn.net/weixin_34068198/article/details/94566466