Implemented Flash Feedback to the Diving Minigame

This commit is contained in:
2025-10-20 16:19:08 +02:00
parent b49bb43f79
commit 9df43b8f53
4 changed files with 251 additions and 23 deletions

View File

@@ -29,7 +29,12 @@ namespace Minigames.DivingForPictures
[Header("Surfacing Settings")]
[Tooltip("Reference to the PlayableDirector that will play the surfacing timeline")]
[SerializeField] private PlayableDirector surfacingTimeline;
[Header("Flash Effect Reference")]
[Tooltip("Reference to the Flash Effect when the picture is taken")]
[SerializeField] private GameObject flashRef;
private CameraViewfinderManager viewfinderManager;
// Settings reference
@@ -871,7 +876,19 @@ namespace Minigames.DivingForPictures
// Calculate score based on proximity and depth
CalculateScore(_currentPhotoTarget, _capturedProximity);
//Trigger the Flash Effect
if (flashRef != null)
{
var flash = flashRef.GetComponent<FlashBehaviour>();
if (flash != null)
{
flash.TriggerFlash();
}
}
// Complete the sequence
CompletePhotoSequence();
}