private void OnContentLoaded(string key, GameObject asset)
 {
     if (!base.gameObject.IsDestroyed())
     {
         GameObject gameObject = UnityEngine.Object.Instantiate(asset);
         gameObject.GetComponent <SEDFSMStartEventSource>().StartEvent = accountSystemStartEvent;
         if (accountSystemFromFTUE)
         {
             LayoutMappings component = gameObject.GetComponent <LayoutMappings>();
             component.SetLayoutType("OneIdFullscreen", "center");
         }
         string currentScene = Service.Get <SceneTransitionService>().CurrentScene;
         if (currentScene == "Settings" && ClubPenguin.Core.SceneRefs.IsSet <CameraSpacePopupManager>())
         {
             eventDispatcher.DispatchEvent(new PopupEvents.ShowCameraSpacePopup(gameObject));
         }
         else if ((bool)GameObject.Find("TopCanvas"))
         {
             eventDispatcher.DispatchEvent(new PopupEvents.ShowTopPopup(gameObject));
         }
         else
         {
             eventDispatcher.DispatchEvent(new PopupEvents.ShowPopup(gameObject));
         }
     }
     accountSystemRequest = null;
 }
示例#2
0
    public void MembershipLoginNeeded()
    {
        LayoutMappings componentInParent = GetComponentInParent <LayoutMappings>();

        if (componentInParent != null)
        {
            componentInParent.SetLayoutType("OneIdFullscreen", "center");
        }
        Service.Get <MixLoginCreateService>().LogoutLastSession();
        Service.Get <RememberMeService>().ResetCurrentUsername();
        membershipService.LoginViaMembership = true;
        rootStateMachine.SendEvent(loginEvent);
    }
        private IEnumerator updateLayout()
        {
            LayoutMappings mappings = GetComponentInParent <LayoutMappings>();

            while (mappings == null)
            {
                yield return(null);

                mappings = GetComponentInParent <LayoutMappings>();
            }
            string layoutType = mappings.GetLayoutType(layoutID);

            if (layoutType != null)
            {
                ILayoutSettingsSwitcher[] components = GetComponents <ILayoutSettingsSwitcher>();
                ILayoutSettingsSwitcher[] array      = components;
                foreach (ILayoutSettingsSwitcher layoutSettingsSwitcher in array)
                {
                    layoutSettingsSwitcher.ApplySettingsForLayout(layoutType);
                }
            }
        }