Пример #1
0
        private IEnumerator Start()
        {
            // Androidの場合はシステムボタンを常に非表示にする
            if (Application.platform == RuntimePlatform.Android)
            {
                Screen.fullScreen = true;
            }

            // this.seAudioSource = gameObject.transform.Find("SeAudio").GetComponent<AudioSource>();

            if (!DoNotInitialize())
            {
                // initialize if first pass
                yield return(Initialize());
            }

            OnStart();
            this.readyWait = new Util.Waiter();
            this.readyWait.StartWait(IsReady, () =>
            {
                this.readyWait = null;
                OnReady();
                StartCoroutine(SceneMain());
            });

            if (this.ImageFader != null)
            {
                this.ImageFader.StartOpenAnimation();
            }
        }
Пример #2
0
 public void StartWait(Func <bool> waitF, Action onEnd)
 {
     if (this.waiter != null)
     {
         Debug.LogError("GameServer::waiter busy");
         onEnd();
     }
     else
     {
         this.waiter = new Util.Waiter();
         this.waiter.StartWait(waitF, () =>
         {
             this.waiter = null;
             onEnd();
         });
     }
 }