Add an input switch to the minigame settings and fix monster spawn issues

This commit is contained in:
Michal Pikulski
2025-10-14 09:04:05 +02:00
parent 2573e7f80e
commit 05f63b28a0
7 changed files with 173 additions and 18 deletions

View File

@@ -15,6 +15,8 @@ namespace Minigames.DivingForPictures.PictureCamera
// Events
public event System.Action OnViewfinderTapped;
public event System.Action OnViewfinderHoldStarted;
public event System.Action OnViewfinderHoldEnded;
// State
private bool isActive = true;
@@ -101,10 +103,30 @@ namespace Minigames.DivingForPictures.PictureCamera
}
}
// Required interface methods (no-op implementations)
public void OnHoldStart(Vector2 position) { }
public void OnHoldMove(Vector2 position) { }
public void OnHoldEnd(Vector2 position) { }
public void OnHoldStart(Vector2 position)
{
if (isActive)
{
// Fire the hold start event
OnViewfinderHoldStarted?.Invoke();
Debug.Log($"[MDPI] Viewfinder OnHoldStart: {position}");
}
}
public void OnHoldMove(Vector2 position)
{
// We can use this for any continuous effects during hold if needed in the future
}
public void OnHoldEnd(Vector2 position)
{
if (isActive)
{
// Fire the hold end event
OnViewfinderHoldEnded?.Invoke();
Debug.Log($"[MDPI] Viewfinder OnHoldEnd: {position}");
}
}
#endregion