| | 1 | | namespace DCL.Tutorial |
| | 2 | | { |
| | 3 | | /// <summary> |
| | 4 | | /// Class that represents the onboarding tutorial step related to how to open the Minimap. |
| | 5 | | /// </summary> |
| | 6 | | public class TutorialStep_MinimapTooltip : TutorialStep_Tooltip |
| | 7 | | { |
| | 8 | | public override void OnStepStart() |
| | 9 | | { |
| 1 | 10 | | base.OnStepStart(); |
| | 11 | |
|
| 1 | 12 | | NavmapView.OnToggle += NavmapView_OnToggle; |
| 1 | 13 | | } |
| | 14 | |
|
| | 15 | | public override void OnStepFinished() |
| | 16 | | { |
| 1 | 17 | | base.OnStepFinished(); |
| | 18 | |
|
| 1 | 19 | | NavmapView.OnToggle -= NavmapView_OnToggle; |
| 1 | 20 | | } |
| | 21 | |
|
| | 22 | | protected override void SetTooltipPosition() |
| | 23 | | { |
| 1 | 24 | | base.SetTooltipPosition(); |
| | 25 | |
|
| 1 | 26 | | if (tutorialController != null && |
| | 27 | | tutorialController.hudController != null && |
| | 28 | | tutorialController.hudController.minimapHud != null && |
| | 29 | | tutorialController.hudController.minimapHud.minimapTooltipReference) |
| | 30 | | { |
| 0 | 31 | | tooltipTransform.position = tutorialController.hudController.minimapHud.minimapTooltipReference.position |
| | 32 | | } |
| 1 | 33 | | } |
| | 34 | |
|
| | 35 | | internal void NavmapView_OnToggle(bool isVisible) |
| | 36 | | { |
| 2 | 37 | | if (isVisible) |
| | 38 | | { |
| 1 | 39 | | isRelatedFeatureActived = true; |
| 1 | 40 | | stepIsFinished = true; |
| 1 | 41 | | tutorialController.PlayTeacherAnimation(TutorialTeacher.TeacherAnimation.QuickGoodbye); |
| 1 | 42 | | } |
| 1 | 43 | | else if (isRelatedFeatureActived) |
| | 44 | | { |
| 1 | 45 | | isRelatedFeatureActived = false; |
| | 46 | | } |
| 1 | 47 | | } |
| | 48 | | } |
| | 49 | | } |