コード例 #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"); });
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 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 { }
 }
コード例 #5
0
        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());
            }
        }
コード例 #6
0
 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);
 }
コード例 #7
0
 public void CloseCommentPopup()
 {
     CanvasConstants.ShowLoading(false);
     Disable(CommentPopup, false);
 }
コード例 #8
0
 private void DisableArCamera()
 {
     CanvasConstants.SetARCamera(false);
 }
コード例 #9
0
 private void ShowCamera()
 {
     background.SetActive(false);
     CanvasConstants.ShowLoading(false);
 }
コード例 #10
0
 public override void OnNavigatingFrom(NavigationEventArgs e)
 {
     base.OnNavigatingFrom(e);
     CanvasConstants.ShowLoading(false);
 }