| | 1 | | using System.Collections; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | namespace DCL.Tutorial |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// Class that represents the onboarding tutorial step related to how to jump with the avatar. |
| | 8 | | /// </summary> |
| | 9 | | public class TutorialStep_AvatarJumping : TutorialStep |
| | 10 | | { |
| | 11 | | [SerializeField] AudioEvent audioEventSuccess; |
| | 12 | | [SerializeField] internal InputAction_Hold jumpingInputAction; |
| | 13 | |
|
| | 14 | | public override void OnStepStart() |
| | 15 | | { |
| 1 | 16 | | base.OnStepStart(); |
| 1 | 17 | | jumpingInputAction.RaiseOnFinished(); |
| 1 | 18 | | } |
| | 19 | |
|
| | 20 | | public override IEnumerator OnStepExecute() |
| | 21 | | { |
| 4 | 22 | | yield return new WaitUntil(() => mainSection.activeSelf && jumpingInputAction.isOn); |
| 1 | 23 | | audioEventSuccess.Play(true); |
| 1 | 24 | | } |
| | 25 | | } |
| | 26 | | } |