Update the photo taking mode to automatic and hone in visual feedback
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using AppleHills.Core.Settings;
|
||||
using Core;
|
||||
using Core.Settings;
|
||||
using UnityEngine.Audio;
|
||||
@@ -71,6 +70,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
public event Action OnAnimationStarted;
|
||||
public event Action OnAnimationCompleted;
|
||||
public event Action OnReverseAnimationStarted; // New event for when zoom-out phase starts
|
||||
public event Action OnPerfectPositionReached; // New event for when viewfinder reaches perfect position (end of zoom-in)
|
||||
public event Action<float> OnProximityUpdated; // New event for proximity updates
|
||||
public event Action<float> OnProgressThresholdReached; // Fires at configured thresholds (25%, 50%, etc.)
|
||||
public event Action OnViewfinderTapped; // Event when viewfinder is tapped during normal display
|
||||
@@ -308,8 +308,16 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
|
||||
if (viewfinderInstance != null)
|
||||
{
|
||||
// Remove input override before destroying
|
||||
if (viewfinderComponent != null)
|
||||
{
|
||||
viewfinderComponent.RemoveInputOverride();
|
||||
}
|
||||
|
||||
Destroy(viewfinderInstance);
|
||||
viewfinderInstance = null;
|
||||
viewfinderComponent = null;
|
||||
viewfinderRectTransform = null;
|
||||
}
|
||||
|
||||
isAnimating = false;
|
||||
@@ -484,8 +492,17 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
{
|
||||
if (viewfinderInstance != null)
|
||||
{
|
||||
// Remove input override before destroying old viewfinder
|
||||
if (viewfinderComponent != null)
|
||||
{
|
||||
viewfinderComponent.RemoveInputOverride();
|
||||
}
|
||||
|
||||
// Already showing a viewfinder, destroy it first
|
||||
Destroy(viewfinderInstance);
|
||||
viewfinderInstance = null;
|
||||
viewfinderComponent = null;
|
||||
viewfinderRectTransform = null;
|
||||
}
|
||||
|
||||
if (settings.ViewfinderPrefab == null)
|
||||
@@ -712,6 +729,9 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
currentProximity = 1.0f; // At target
|
||||
OnProximityUpdated?.Invoke(currentProximity);
|
||||
|
||||
// Fire event that we've reached perfect position
|
||||
OnPerfectPositionReached?.Invoke();
|
||||
|
||||
// Brief pause at target
|
||||
yield return new WaitForSecondsRealtime(0.2f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user