private bool onIglooUpdated(IglooServiceEvents.IglooUpdated evt) { newLayout = null; eventChannel.AddListenerOneShot <IglooServiceEvents.IglooActiveLayoutLoaded>(onActiveLayoutLoaded); Service.Get <INetworkServicesManager>().IglooService.GetActiveIglooLayout(evt.IglooId); sendNotification(UpdateNotice, UpdateCountDown); CoroutineRunner.Start(reloadScene(), this, "Reload igloo scene"); return(false); }
public void Start() { CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>(); localPresenceData = cPDataEntityCollection.GetComponent <PresenceData>(cPDataEntityCollection.LocalPlayerHandle); if (localPresenceData != null) { localPresenceData.IsNotInCurrentRoomsScene = true; } else { Log.LogError(this, "Unable to set IsNotInCurrentRoomsScene. Jump to friends may be broken."); } PrefabContentKey prefabContentKey = (PrefabContentKey)Service.Get <SceneTransitionService>().GetSceneArg("appletToLaunch"); if (prefabContentKey == null) { CloseApplet(); throw new InvalidOperationException("CellPhoneAppletController was added in a scene that did not have a APPLET_SCENE_ARG_KEY value"); } events = new EventChannel(Service.Get <EventDispatcher>()); events.AddListenerOneShot <CellPhoneEvents.ReturnToHomeScreen>(onCloseApplet); CoroutineRunner.Start(loadAndInitPrefab(prefabContentKey), this, "loadAndInitPrefab"); }