Added a Flash when taking a picture.

This commit is contained in:
2025-10-20 13:21:57 +02:00
parent 1c721541db
commit e1f62a0fa1
7 changed files with 290 additions and 12 deletions

View File

@@ -29,7 +29,11 @@ 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
@@ -866,7 +870,20 @@ 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();
}