コード例 #1
0
        private IEnumerator LoadAsync(string id, SceneDelegate sceneCallback = null)
        {
            loader = SceneManager.LoadSceneAsync(id, LoadSceneMode.Single);
            yield return(loader);

            sceneCallback?.Invoke();
        }
コード例 #2
0
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            base.OnUpdateFrame(e);

            dt = (float)e.Time;

            updater?.Invoke(e);
        }
コード例 #3
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);

            renderer?.Invoke(e);

            GL.Flush();
            SwapBuffers();
        }
コード例 #4
0
        public void StartLoadAsync(string[] ids, SceneDelegate sceneCallback = null)
        {
            var required = ids.Length;
            var current  = 0;

            foreach (var id in ids)
            {
                Loader.StartCoroutine(LoadAsync(id, () => {
                    current++;
                    if (required == current)
                    {
                        sceneCallback?.Invoke();
                    }
                }
                                                ));
            }
        }