zoukankan      html  css  js  c++  java
  • loading通用界面笔记

    Private Action proCB = null;

    public void AsyncLoadScene(string sceneName, Action loaded)

        {

            loadingWnd.SetWndState();

            AsyncOperation sceneAsync = SceneManager.LoadSceneAsync(sceneName);

            prgCB = () =>

            {

                float val = sceneAsync.progress;

                loadingWnd.SetProgress(val);

                if (val == 1)

                {

                    if (loaded != null)

                    {

                        loaded();

                    }

                    prgCB = null;

                    sceneAsync = null;

                    loadingWnd.SetWndState(false);

                }

            };

    }

    void Update()

        {

            if (prgCB != null)

            {

                prgCB();

            }

        }

    String sceneName;

    AsyncLoadScene(sceneName,()=>{

    //新场景加载成功后执行,初始化新场景

    });

  • 相关阅读:
    标准输入输出
    UNIX基础概念
    phpstrom设置php环境
    nginx+php+swoole安装记录
    MySQL索引
    生成器来解决大文件读取,大数据下载
    PHP调优
    PHP-FPM详解
    远程登录服务器配置
    HTTPS配置
  • 原文地址:https://www.cnblogs.com/tqvdong/p/14921649.html
Copyright © 2011-2022 走看看