Esempio n. 1
0
        IEnumerator coroutineLoading(string levelName, dfProgressBar bar, ISwitchPanelBehaviour switchPanel)
        {
            async = Application.LoadLevelAsync(levelName);

again:
            if (async.isDone)
            {
                Debug.Log("completed");
                if (switchPanel != null)
                {
                    switchPanel.Switch();
                }
            }
            else
            {
                Debug.Log("LoadNewLevel: async.progress=" + async.progress);
                if (bar != null)
                {
                    bar.Value = async.progress;
                }
                yield return(new WaitForEndOfFrame());

                goto again;
            }
        }
Esempio n. 2
0
 public virtual void OnClick(dfControl control, dfMouseEventArgs args)
 {
     switchPanelBehaviour.Switch();
 }