Beispiel #1
0
        public void Start()
        {
            VideoButton.onClick.AddListener(delegate {
                if (!string.IsNullOrEmpty(detailsSource.videoURL))
                {
                    OpenURL(detailsSource.videoURL);
                }
            });

            ReadMoreButton.onClick.AddListener(delegate {
                if (!string.IsNullOrEmpty(detailsSource.linkURL))
                {
                    OpenURL(detailsSource.linkURL);
                }
            });

            ShareButton.onClick.AddListener(delegate {
                ShowSharePopup();
            });

            EmailButton.onClick.AddListener(() => PushEmail());

            LikeButton.onClick.AddListener(() => Like());

            CommentButton.onClick.AddListener(() => ShowCommentPopup());

            ScanButton.onClick.AddListener(() => { CanvasConstants.Navigate("Scan"); });
        }
 public override void OnNavigatedTo(NavigationEventArgs e)
 {
     isPageActive = true;
     CanvasConstants.ShowLoading(true);
     //Delay camera load so that the page transition effect finishes
     Invoke("LoadCamera", 0.5f);
 }
 private void LoadCamera()
 {
     if (isPageActive)
     {
         CanvasConstants.SetARCamera(true);
         cloudRecognition.SetActive(true);
         imageTarget.SetActive(true);
         //Delay disabling background or home page contents will be shown till the camera feedback appears
         Invoke("ShowCamera", 0.1f);
     }
 }
 public override void Start()
 {
     base.Start();
     try
     {
         CanvasConstants.SetARCamera(true);
         Invoke("DisableArCamera", 0.5f);
         trackableCloudRecoEventHandler = imageTarget.GetComponent <TrackableCloudRecoEventHandler>();
         trackableCloudRecoEventHandler.OnTrackingLostHandler  += trackableCloudRecoEventHandler_OnTrackingLostHandler;
         trackableCloudRecoEventHandler.OnTrackingFoundHandler += trackableCloudRecoEventHandler_OnTrackingFoundHandler;
         trackableCloudRecoEventHandler.OnVideoPlayHandler     += trackableCloudRecoEventHandler_OnVideoPlayHandler;
         trackableCloudRecoEventHandler.OnVideoLoadHandler     += trackableCloudRecoEventHandler_OnVideoLoadHandler;
         trackableCloudRecoEventHandler.OnVideoUnloadHandler   += trackableCloudRecoEventHandler_OnVideoUnloadHandler;
         trackableCloudRecoEventHandler.OnVideoFinishHandler   += trackableCloudRecoEventHandler_OnVideoFinishHandler;
     }
     catch { }
 }
        public static IEnumerator PostRequest(string serviceURL, bool showLoading, bool requiresToken, EventHandler responseHandler)
        {
            Debug.Log(serviceURL);
            if (showLoading)
            {
                CanvasConstants.ShowLoading(true);
            }
            WWW www = new WWW(serviceURL);

            yield return(www);

            if (showLoading)
            {
                CanvasConstants.ShowLoading(false);
            }
            if (responseHandler != null)
            {
                responseHandler(www, new EventArgs());
            }
        }
 public override void OnNavigatedFrom(NavigationEventArgs e)
 {
     trackableCloudRecoEventHandler.PauseAndUnloadVideo();
     trackableCloudRecoEventHandler.OnTrackingLost(true);
     trackableCloudRecoEventHandler.isAudioMuted = false;
     SetVolumeButton(true);
     background.SetActive(true);
     CanvasConstants.SetARCamera(false);
     streamingIndicator.SetActive(false);
     CanvasConstants.ShowLoading(false);
     cloudRecognition.SetActive(false);
     imageTarget.SetActive(false);
     SetFlash(false);
     // hide the share popup on closing
     sharePopup.SetActive(false);
     volumeButton.SetActive(false);
     shareButton.SetActive(false);
     linkButton.SetActive(false);
     captureButton.SetActive(false);
     videoFinished.SetActive(false);
 }
Beispiel #7
0
 public void CloseCommentPopup()
 {
     CanvasConstants.ShowLoading(false);
     Disable(CommentPopup, false);
 }
 private void DisableArCamera()
 {
     CanvasConstants.SetARCamera(false);
 }
 private void ShowCamera()
 {
     background.SetActive(false);
     CanvasConstants.ShowLoading(false);
 }
 public override void OnNavigatingFrom(NavigationEventArgs e)
 {
     base.OnNavigatingFrom(e);
     CanvasConstants.ShowLoading(false);
 }