diff --git a/Assets/Scripts/UI/Tutorial/DivingTutorial.cs b/Assets/Scripts/UI/Tutorial/DivingTutorial.cs index 7d6a3328..0fe35ad3 100644 --- a/Assets/Scripts/UI/Tutorial/DivingTutorial.cs +++ b/Assets/Scripts/UI/Tutorial/DivingTutorial.cs @@ -11,8 +11,15 @@ namespace UI.Tutorial { public class DivingTutorial : MonoBehaviour, ITouchInputConsumer { + public enum ProgressType + { + Manual, // Wait for player tap after animation loop + Auto // Automatically progress after animation loop + } + private StateMachine _stateMachine; public bool playTutorial; + [SerializeField] private ProgressType progressType = ProgressType.Manual; // gating for input until current state's animation finishes first loop [SerializeField] private GameObject tapPrompt; @@ -107,7 +114,8 @@ namespace UI.Tutorial _canAcceptInput = allow; if (tapPrompt != null) { - tapPrompt.SetActive(allow); + // Only show tap prompt in Manual mode + tapPrompt.SetActive(allow && progressType == ProgressType.Manual); } } @@ -201,7 +209,19 @@ namespace UI.Tutorial yield return null; } - SetInputEnabled(true); + // After first loop completes, handle based on progress type + if (progressType == ProgressType.Auto) + { + // Auto mode: immediately progress to next state + _stateMachine.Next(true); + SetupInputGateForCurrentState(); + } + else + { + // Manual mode: enable input and wait for player tap + SetInputEnabled(true); + } + _waitLoopCoroutine = null; } }