Implemented Flash Feedback to the Diving Minigame
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user