Example #1
0
        private void loadAppletScene(CellPhoneEvents.ChangeCellPhoneScreen evt, PrefabContentKey prefabKey)
        {
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("appletToLaunch", prefabKey);
            Dictionary <string, object> args = dictionary;

            loadScene(evt, "CellPhoneApplet", args);
            Service.Get <LoadingController>().AddLoadingSystem(LoadingSystemObject);
        }
Example #2
0
 private void loadScene(CellPhoneEvents.ChangeCellPhoneScreen evt, string scene, Dictionary <string, object> args)
 {
     if (args == null)
     {
         args = new Dictionary <string, object>();
     }
     args.Add(SceneTransitionService.SceneArgs.ShowCellPhoneOnEnterScene.ToString(), true);
     if (!string.IsNullOrEmpty(evt.LoadingScreenOverride))
     {
         args.Add(SceneTransitionService.SceneArgs.LoadingScreenOverride.ToString(), evt.LoadingScreenOverride);
     }
     Service.Get <SceneTransitionService>().LoadScene(scene, "Loading", args);
 }
Example #3
0
        private void loadApplet(CellPhoneEvents.ChangeCellPhoneScreen evt, PrefabContentKey prefabKey)
        {
            ConditionalConfiguration conditionalConfiguration = Service.Get <ConditionalConfiguration>();
            int num = conditionalConfiguration.Get("System.Memory.property", 0);

            if (evt.AppletSceneSystemMemoryThreshold >= 0 && num <= evt.AppletSceneSystemMemoryThreshold)
            {
                loadAppletScene(evt, prefabKey);
                return;
            }
            loadScreen(prefabKey, showLoadingScreen: false);
            CoroutineRunner.Start(runLoadingScreenTimer(), this, "CellPhoneLoadingScreenTimer");
        }
Example #4
0
        private bool onChangeScreen(CellPhoneEvents.ChangeCellPhoneScreen evt)
        {
            switch (evt.Behaviour)
            {
            case CellPhoneAppBehaviour.LoadScene:
                if (string.IsNullOrEmpty(evt.BehaviourParam))
                {
                    Log.LogError(this, "Cell phone load scene param not set for LoadScene");
                }
                else
                {
                    loadScene(evt, evt.BehaviourParam, null);
                }
                break;

            case CellPhoneAppBehaviour.ChangeScreen:
            {
                if (string.IsNullOrEmpty(evt.BehaviourParam))
                {
                    Log.LogError(this, "Cell phone change screen param not set for ChangeScreen");
                    break;
                }
                PrefabContentKey prefabKey = new PrefabContentKey(evt.BehaviourParam);
                loadApplet(evt, prefabKey);
                break;
            }

            case CellPhoneAppBehaviour.LoadSettings:
            {
                ConditionalConfiguration conditionalConfiguration = Service.Get <ConditionalConfiguration>();
                int num = conditionalConfiguration.Get("System.Memory.property", 0);
                if (PlatformUtils.GetAspectRatioType() == AspectRatioType.Portrait || (evt.AppletSceneSystemMemoryThreshold >= 0 && num <= evt.AppletSceneSystemMemoryThreshold))
                {
                    loadScene(evt, "Settings", null);
                    break;
                }
                PrefabContentKey prefabKey = new PrefabContentKey(evt.BehaviourParam);
                loadScreen(prefabKey);
                break;
            }
            }
            return(false);
        }