IEnumerator StartCapturing() { yield return(new WaitForSeconds(.1f)); CamCommunicator.StartCapturing(); shouldCapture = true; isCapturing = true; }
void Update() { if (shouldCapture && !isCapturing) { CamCommunicator.StartCapturing(); isCapturing = true; } if (!shouldCapture && isCapturing) { CamCommunicator.EndCapturing(); isCapturing = false; } }
protected virtual void Move() { CapturePosition tmp = CamCommunicator.CalcMovementPosition(Cam); if (!tmp.valid) { return; } Vector3 originalPosition = Cam.ScreenToWorldPoint(tmp.position); transform.position = originalPosition; }
void OnApplicationQuit() { CamCommunicator.EndCapturing(); isCapturing = false; }