Esempio n. 1
0
        public void Initialize()
        {
            if (mInitialized)
            {
                return;
            }

            HideCharacterQuote();

            DontDestroyOnLoad(transform);

            Get = this;
            Get.LoadingCamera.enabled = true;

            SetLittleCompass(true);

            ActivityInfo         = "Loading";
            DetailsInfo          = string.Empty;
            QuitMessage.enabled  = false;
            ErrorMessage.enabled = false;
            SplashScreen         = false;
            //SplashScreenSprite.enabled	= false;
            LoadingCompass.gameObject.SetActive(false);

            SetLittleCompass(false);

            ActivityInfo         = "Loading";
            DetailsInfo          = string.Empty;
            QuitMessage.enabled  = false;
            ErrorMessage.enabled = false;
            SplashScreen         = false;
            //SplashScreenSprite.enabled	= false;
            LoadingCompass.gameObject.SetActive(false);

            mInitialized = true;
        }
Esempio n. 2
0
        public static IEnumerator LoadStart(Mode mode)
        {
            CurrentMode = mode;

            if (!mInitialized)
            {
                GameObject guiLoading = GameObject.Find("=LOADING=");
                Get = guiLoading.GetComponent <GUILoading>();
                Get.Initialize();
            }
            Get.LoadingCamera.enabled = true;
            float backgroundAlphaTarget = 0f;

            //Debug.Log ("GUILOAING: LoadStart");
            if (IsLoading)
            {
                return(Get.BreakImmediately());
            }
            else
            {
                switch (mode)
                {
                case Mode.SmallInGame:
                default:
                    Get.SetLittleCompass(true);
                    Get.BackgroundSprite.enabled        = false;
                    Get.BackgroundOverlaySprite.enabled = false;
                    Get.LoadingAnchor.side = UIAnchor.Side.Center;
                    break;

                case Mode.FullScreenBlack:
                    Get.SetLittleCompass(false);
                    backgroundAlphaTarget = 1.0f;
                    Get.DisplayRandomCharacterQuote();
                    if (GameManager.Is(FGameState.Startup))
                    {
                        Get.BackgroundSprite.alpha        = 1f;
                        Get.BackgroundOverlaySprite.alpha = BackgroundSpriteAlphaMultiplier;
                    }
                    else
                    {
                        Get.BackgroundSprite.alpha        = 0f;
                        Get.BackgroundOverlaySprite.alpha = 0f;
                    }
                    Get.QuoteText.alpha = Get.BackgroundSprite.alpha;

                                                                                                #if UNITY_EDITOR
                    if (VRManager.VRMode | VRManager.VRTestingMode)
                    {
                                                                                                #else
                    if (VRManager.VRMode)
                    {
                                                                                                #endif
                        Get.QuoteText.enabled               = false;
                        Get.BackgroundSprite.enabled        = false;
                        Get.BackgroundOverlaySprite.enabled = false;
                        //we don't use the sprite in VR mode
                        //we just set the background to black
                        Get.LoadingCamera.clearFlags               = CameraClearFlags.SolidColor;
                        Get.LoadingCamera.backgroundColor          = Color.black;
                        Get.LoadingAnchor.side                     = UIAnchor.Side.Bottom;
                        Get.LoadingCompass.transform.localPosition = new Vector3(0f, 350f, 0f);
                    }
                    else
                    {
                        Get.QuoteText.enabled                      = true;
                        Get.BackgroundSprite.enabled               = true;
                        Get.BackgroundOverlaySprite.enabled        = true;
                        Get.LoadingCamera.clearFlags               = CameraClearFlags.Depth;
                        Get.LoadingAnchor.side                     = UIAnchor.Side.BottomLeft;
                        Get.LoadingCompass.transform.localPosition = new Vector3(200f, 350f, 0f);
                    }
                    break;
                }
                return(Get.LoadStartOverTime(backgroundAlphaTarget));
            }
        }