photo_input_switch (#27)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com> Reviewed-on: #27
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user