IEnumerator Respawn()
        {
            float time = m_respawnTime;

            while (time > 0)
            {
                time -= Time.deltaTime;
                yield return(YieldFactory.GetWaitForEndOfFrame());
            }
            GameObject.Find("GameManager").GetComponent <GameManager>().CmdRespawnShip(this.m_shipID);
        }
Esempio n. 2
0
        private IEnumerator delayedDisplayGlobalChat(bool in_value)
        {
            yield return(YieldFactory.GetWaitForEndOfFrame());

            m_chatGroupLobby.SetActive(!in_value);
            m_chatGroupGlobal.SetActive(in_value);

            m_lobbyChatNotification.SetActive(false);
            m_globalChatNotification.SetActive(false);

            GameObject tabGlobal = GameObject.Find("TabGlobal");
            GameObject tabLocal  = GameObject.Find("TabLocal");

            Image lobbyButton  = tabLocal.transform.FindDeepChild("Button").GetComponent <Image>();
            Image globalButton = tabGlobal.transform.FindDeepChild("Button").GetComponent <Image>();

            lobbyButton.color  = !in_value ? Color.white : notSelected;
            globalButton.color = in_value ? Color.white : notSelected;
        }
Esempio n. 3
0
        private IEnumerator StartUpMgrs()
        {
            // start up StateMgr
            yield return(YieldFactory.GetWaitForEndOfFrame());

            GStateManager.Instance.ForceStateInfo(_stateInfo);

            // warmup shaders inside /Resources/Shaders/ (do this once)
            Shader.WarmupAllShaders();

            // ensure the rest are setup
            yield return(YieldFactory.GetWaitForEndOfFrame());

            GCore.Instance.EnsureMgrsAreSetup();

            while (!GCore.Instance.IsInitialized)
            {
                yield return(YieldFactory.GetWaitForEndOfFrame());
            }

            // play music
            //GSoundMgr.Instance.PlayMusic("commonMusic");

#if ENABLE_ASSET_BUNDLES
#if SMRJ_HACK
            AssetBundleManager.SetDevelopmentAssetBundleServer();
#else
            // LIVE URL
            if (GCore.Wrapper.Client.AppId == "30015")
            {
                AssetBundleManager.SetSourceAssetBundleURL(ASSET_BUNDLE_URL_LIVE);
            }
            // TEST URL
            else
            {
                AssetBundleManager.SetSourceAssetBundleURL(ASSET_BUNDLE_URL);
            }
#endif

#if UNITY_EDITOR
            if (!AssetBundleManager.SimulateAssetBundleInEditor)
#endif
            {
                AssetBundleLoadManifestOperation request = AssetBundles.AssetBundleManager.Initialize();
                if (request != null)
                {
                    yield return(StartCoroutine(request));
                }

                while (AssetBundleManager.AssetBundleManifestObject == null)
                {
                    yield return(YieldFactory.GetWaitForEndOfFrame());
                }
            }

            AssetBundleManager.LoadAssetBundle("eggiesslotstate");
            while (AssetBundleManager.IsDownloadingBundles())
            {
                GStateManager.Instance.ForcedUpdatedLoadingAssetBundle();
                yield return(YieldFactory.GetWaitForEndOfFrame());
            }
            GStateManager.Instance.EnableLoadingScreen(false);
#endif

            yield return(StartCoroutine(loadCommonSounds()));

            yield return(YieldFactory.GetWaitForEndOfFrame());
        }