private void Update() { if (!_doubleTapEnabled) { return; } #if UNITY_EDITOR || UNITY_STANDALONE_WIN // When clicking, start a timer to check for a 2nd click. if (Input.GetMouseButtonDown(0)) { _clickCount++; StartCoroutine(DoubleClickTimer()); } if (_clickCount == 2) { _clickCount = 0; PhotoCameraApi.CreatePhoto(); } #endif #if UNITY_ANDROID foreach (Touch touch in Input.touches) { if (touch.tapCount == 2) { PhotoCameraApi.CreatePhoto(); return; } } #endif }
private IEnumerator HidePhotoRoutine() { yield return(new WaitForSeconds(_photoScreenTime)); // Disable the foreground and backdrop images to reduce draw calls. _foregroundImage.enabled = false; _backdrop.enabled = false; PhotoCameraApi.ShowPhotoFinished(); }
private void Awake() { PhotoCameraApi.OnCreatePhoto += () => { GameObject foundObject = CheckObject(); if (!foundObject) { return; } for (int i = 0; i < Properties.currentFindableItems.Length; i++) { if (Properties.currentFindableItems[i].model == foundObject) { PhotoCameraApi.FoundObject(i); break; } } }; }
private void CreatePhoto() { _foregroundImage.texture = ToTexture2D(_renderTexture); PhotoCameraApi.ShowPhoto(); }