| | 1 | | using DCL.Helpers; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | namespace DCL.Tutorial |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// Class that represents the onboarding tutorial step related to how to view the players in scene and configure voi |
| | 8 | | /// </summary> |
| | 9 | | public class TutorialStep_Tooltip_UsersAround : TutorialStep_Tooltip |
| | 10 | | { |
| | 11 | | private const string PLAYER_PREFS_VOICE_CHAT_FEATURE_SHOWED = "VoiceChatFeatureShowed"; |
| | 12 | |
|
| | 13 | | public override void OnStepStart() |
| | 14 | | { |
| 1 | 15 | | base.OnStepStart(); |
| | 16 | |
|
| 1 | 17 | | if (tutorialController != null && |
| | 18 | | tutorialController.hudController != null && |
| | 19 | | tutorialController.hudController.usersAroundListHud != null) |
| | 20 | | { |
| 0 | 21 | | tutorialController.hudController.usersAroundListHud.OnOpen += UsersAroundListHud_OnOpen; |
| | 22 | | } |
| 1 | 23 | | } |
| | 24 | |
|
| | 25 | | public override void OnStepFinished() |
| | 26 | | { |
| 1 | 27 | | base.OnStepFinished(); |
| | 28 | |
|
| | 29 | | // TODO (Santi): This a TEMPORAL fix. It will be removed when we refactorize the tutorial system in order to |
| 1 | 30 | | PlayerPrefsUtils.SetInt(PLAYER_PREFS_VOICE_CHAT_FEATURE_SHOWED, 1); |
| | 31 | |
|
| 1 | 32 | | if (tutorialController != null && |
| | 33 | | tutorialController.hudController != null && |
| | 34 | | tutorialController.hudController.usersAroundListHud != null) |
| | 35 | | { |
| 0 | 36 | | tutorialController.hudController.usersAroundListHud.OnOpen -= UsersAroundListHud_OnOpen; |
| | 37 | | } |
| 1 | 38 | | } |
| | 39 | |
|
| | 40 | | protected override void SetTooltipPosition() |
| | 41 | | { |
| 1 | 42 | | base.SetTooltipPosition(); |
| | 43 | |
|
| 1 | 44 | | if (tutorialController != null && |
| | 45 | | tutorialController.hudController != null && |
| | 46 | | tutorialController.hudController.minimapHud != null && |
| | 47 | | tutorialController.hudController.minimapHud.usersAroundTooltipReference) |
| | 48 | | { |
| 0 | 49 | | tooltipTransform.position = tutorialController.hudController.minimapHud.usersAroundTooltipReference.posi |
| | 50 | | } |
| 1 | 51 | | } |
| | 52 | |
|
| | 53 | | internal void UsersAroundListHud_OnOpen() |
| | 54 | | { |
| 1 | 55 | | stepIsFinished = true; |
| 1 | 56 | | tutorialController.PlayTeacherAnimation(TutorialTeacher.TeacherAnimation.QuickGoodbye); |
| 1 | 57 | | } |
| | 58 | | } |
| | 59 | | } |