private void onCellPhonePrefabLoaded(string path, GameObject cellPhonePrefab)
        {
            GameObject popup = Object.Instantiate(cellPhonePrefab);

            PopupEvents.ShowCameraSpacePopup evt = new PopupEvents.ShowCameraSpacePopup(popup, destroyPopupOnBackPressed: false, scaleToFit: true, "Accessibility.Popup.Title.CellPhone", "MainCamera", 1f, 0);
            Service.Get <EventDispatcher>().DispatchEvent(evt);
            StateMachineContext componentInParent = GetComponentInParent <StateMachineContext>();

            componentInParent.SendEvent(new ExternalEvent("Root", "noui"));
        }
Exemplo n.º 2
0
 private bool onShowPopup(PopupEvents.ShowCameraSpacePopup evt)
 {
     showPopup(evt.Popup, evt.DestroyPopupOnBackPressed);
     enableCamera();
     if (!string.IsNullOrEmpty(evt.NewCameraTag))
     {
         moveToCamera(evt.NewCameraTag, evt.PlaneDistance, evt.OrderInLayer);
     }
     else
     {
         resetCamera();
     }
     return(false);
 }