コード例 #1
0
        IEnumerator StartCapturing()
        {
            yield return(new WaitForSeconds(.1f));

            CamCommunicator.StartCapturing();
            shouldCapture = true;
            isCapturing   = true;
        }
コード例 #2
0
 void Update()
 {
     if (shouldCapture && !isCapturing)
     {
         CamCommunicator.StartCapturing();
         isCapturing = true;
     }
     if (!shouldCapture && isCapturing)
     {
         CamCommunicator.EndCapturing();
         isCapturing = false;
     }
 }
コード例 #3
0
        protected virtual void Move()
        {
            CapturePosition tmp = CamCommunicator.CalcMovementPosition(Cam);

            if (!tmp.valid)
            {
                return;
            }


            Vector3 originalPosition = Cam.ScreenToWorldPoint(tmp.position);

            transform.position = originalPosition;
        }
コード例 #4
0
 void OnApplicationQuit()
 {
     CamCommunicator.EndCapturing();
     isCapturing = false;
 }